I need help notifying all Civil Protection Units, and only the Civil Protection Units, when another Civil Protection Unit dies.
To notify the entire server that the mayor has died, I use this code:
PlayerDeath = function(ply, weapon, killer) ply:teamBan() ply:changeTeam(GAMEMODE.DefaultTeam, true) if killer:IsPlayer() then DarkRP.notifyAll(0, 4, "The mayor has been murdered.") else DarkRP.notifyAll(0, 4, "The mayor has died.") end end,
I would like to do something similar when a Civil Protection Unit dies. However I would like to only notify the Civil Protection Units about the death of another Civil Protection Units death.
How do I modify the code above to accomplish this?
I would also not like to ban the CP dying for his job or change his team, but I already know that I just remove those lines