Garry's Mod

Garry's Mod

69 ratings
CP Anti-Friendly Fire (DarkRP)
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Roleplay, Realism
File Size
Posted
364.000 B
13 Jan, 2015 @ 12:55pm
1 Change Note ( view )

Subscribe to download
CP Anti-Friendly Fire (DarkRP)

Description
This disables damage between CP, Mayor, CP Chief, and SWAT if you have it in DarkRP.

If you want to add another job to the protection, make sure it's called TEAM_MAYORGUARD and it'll work!

Let me know if you have any problems.
7 Comments
TheDooberdude 26 Sep, 2017 @ 6:47pm 
This doesn't work anymore?
Anything similar?
Zak 6 Dec, 2015 @ 2:55pm 
Why not us isCP ???
Javi2 18 Jan, 2015 @ 5:33pm 
oh ok
Thanks
rat balls  [author] 18 Jan, 2015 @ 3:38pm 
Oh crap that's my old script. I'll rewrite it later on. You can add me and message me sometime tomorrow to remind me.
Javi2 18 Jan, 2015 @ 11:35am 
So i did what you said and it doesnt work
Here's the script:
function noFriendlyFire( ply, victim )
if ply.IsPlayer()
if ply:Team() == victim:Team() then
if ply:Team() == TEAM_CHIEF or ply:Team() == TEAM_MAYOR or ply:Team() == TEAM_SWAT or ply:GetTeam() == TEAM_SWATCO or ply:GetTeam() == TEAM_SWATCHIEF or ply:GetTeam() == TEAM_SS or ply:GetTeam() == TEAM_NG or ply:GetTeam() == TEAM_army or ply:GetTeam() == TEAM_search or ply:GetTeam() == TEAM_NGLT or ply:GetTeam() == TEAM_FIREMAM or ply:GetTeam() == TEAM_POLICE or ply:GetTeam() == TEAM_SUPPLIER then
return false
end
end
end
hook.Add( "PlayerShouldTakeDamage", "noFriendlyfireExceptGovtHook", noFriendlyFire )
rat balls  [author] 18 Jan, 2015 @ 7:58am 
Retro - it's a very simple script. Use GMad to extract it, and at the line where it has all the teams, just add your own using the format I did.
Javi2 17 Jan, 2015 @ 8:41pm 
Is there a way i can add more than just 5 government officials to the script?