function RDMPunishment( victim, wep, killer )
if !victim.is_traitor and !killer.is_traitor then
if !killer.InnoKills then
killer.InnoKills = 1
killer.InnoKills = killer.InnoKills + 1
if killer.InnoKills >= 2 then GameMsg( killer:Nick() .. " killed 2 innocents when he himself was innocent and committed suicide from grief!" ) killer:Kill() killer.InnoKills = nil end end
hook.Add( “PlayerDeath”, “SlayRDMingBitches”, RDMPunishment )
I may be just blind, but that looks fine to me.
Every time someone gets killer.InnoKills >= 2 it crashes my server from spamming that the player suicided. This baffles me because isn’t this hook only called everytime a player dies?
GameMsg is defined in the gamemode