Forez Member
Posts : 87 Join date : 2011-10-06
| Subject: [DONE] Anti friendly fire script Sun Oct 09, 2011 8:22 pm | |
| Working for all classes and in any gamemode.Tested on listen server with bots. I think we could use this on ZRP? - Code:
-
function friendlyFire(player, attacker) if player:Team() == attacker:Team() then attacker:ChatPrint(player:GetName() .. " is on your team!Watch out!") end end
hook.Add("PlayerHurt", "PlayerHurt", friendlyFire) - Code:
-
function friendlyFire(player, attacker) if player:Team() == attacker:Team() then attacker:ChatPrint(player:GetName() .. " is on your team!Watch out!") end end
hook.Add("PlayerHurt", "PlayerHurt", friendlyFire)
function checkAdmin(ply) if ply:IsAdmin() then ply:ChatPrint(attacker:GetName() .. "shot his comrade") end end concommand.Add("info_admin", checkAdmin) I am not sure if this will work,but this SHOULD notify admin that somebody shots his teammate.
Last edited by Forez on Mon Oct 10, 2011 10:44 pm; edited 1 time in total | |
|
Danbready Administrator
Posts : 306 Join date : 2011-08-22 Location : Ireland: Dublin
| Subject: Re: [DONE] Anti friendly fire script Sun Oct 09, 2011 9:55 pm | |
| Good idea. I don't know how many times i've been shit accidentally by a frendly Reaper/Zombie Hunter Or CP How will the notification be displayed? | |
|
Forez Member
Posts : 87 Join date : 2011-10-06
| Subject: Re: [DONE] Anti friendly fire script Sun Oct 09, 2011 10:14 pm | |
| | |
|
Miaw Owner
Posts : 170 Join date : 2011-08-21 Location : Badass Island
| Subject: Re: [DONE] Anti friendly fire script Mon Oct 10, 2011 7:11 am | |
| | |
|
Sponsored content
| Subject: Re: [DONE] Anti friendly fire script | |
| |
|