[EDGE] - Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeServersLatest imagesSearchRegisterLog in

 

 [DONE] Anti friendly fire script

Go down 
3 posters
AuthorMessage
Forez
Member
Forez


Posts : 87
Join date : 2011-10-06

[DONE]  Anti friendly fire script Empty
PostSubject: [DONE] Anti friendly fire script   [DONE]  Anti friendly fire script EmptySun 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
Back to top Go down
Danbready
Administrator
Administrator
Danbready


Posts : 306
Join date : 2011-08-22
Location : Ireland: Dublin

[DONE]  Anti friendly fire script Empty
PostSubject: Re: [DONE] Anti friendly fire script   [DONE]  Anti friendly fire script EmptySun 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 Tongue
How will the notification be displayed?
Back to top Go down
http://www.ldt-clan.com
Forez
Member
Forez


Posts : 87
Join date : 2011-10-06

[DONE]  Anti friendly fire script Empty
PostSubject: Re: [DONE] Anti friendly fire script   [DONE]  Anti friendly fire script EmptySun Oct 09, 2011 10:14 pm

Blue message in chat.
Back to top Go down
Miaw
Owner
Owner
Miaw


Posts : 170
Join date : 2011-08-21
Location : Badass Island

[DONE]  Anti friendly fire script Empty
PostSubject: Re: [DONE] Anti friendly fire script   [DONE]  Anti friendly fire script EmptyMon Oct 10, 2011 7:11 am

Cool.
Back to top Go down
Sponsored content





[DONE]  Anti friendly fire script Empty
PostSubject: Re: [DONE] Anti friendly fire script   [DONE]  Anti friendly fire script Empty

Back to top Go down
 
[DONE] Anti friendly fire script
Back to top 
Page 1 of 1
 Similar topics
-
» [LUA][DONE] Player Dies script.

Permissions in this forum:You cannot reply to topics in this forum
[EDGE] - Community :: Media :: Mapping, Lua and Other Developments-
Jump to: