• Team kill
    0 replies, posted
This code doesn't make any sense at all:[CODE] hook.Add( "Initialize", "noteamkillpls", function() local teams = { [ TEAM_POLICE ] = 1, [ TEAM_POLICEGOLD ] = 1, [ TEAM_CHIEF ] = 1, [ TEAM_CHIEFGOLD ] = 1, [ TEAM_SWAT ]= 1, [ TEAM_SWATCQB ] = 1, [ TEAM_SWATSNIPER ] = 1, [ TEAM_SWATLEADER ] = 1, [ TEAM_SECRET ] = 1, [ TEAM_MAYOR ] = 1, [ TEAM_LAWYER ] = 1, [ TEAM_TRON ] = 2, } hook.Add("PlayerShouldTakeDamage", "PlayerShouldTakeDamage:AvoidTeamDamage", function( victim, attacker ) if IsValid( attacker ) and attacker:IsPlayer() then if teams[victim:Team()] == teams[attacker:Team()] then return false end end end ) end )[/CODE] What happens is nobody can take or give damage unless they are those teams, So yeah doesn't make any sense because I looked through the code for any problems and I cant seem to find any problems with the code.
Sorry, you need to Log In to post a reply to this thread.