How to give to all cops 100$ when a player with wanted dead?:D - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to give to all cops 100$ when a player with wanted dead?:D (
/showthread.php?tid=455100)
How to give to all cops 100$ when a player with wanted dead?:D -
Kapone21 - 31.07.2013
How to give to all cops 100$ when a player with wanted dead?
Please say
Re: How to give to all cops 100$ when a player with wanted dead?:D -
dEcooR - 31.07.2013
Код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(GetPlayerWantedLevel(playerid) > 0)
{
for(new i=0;i< MAX_PLAYERS;i++)
{
if(team[i] == TEAM_COPS)
{
GivePlayerMoney(i,100);
}
}
}
return 1;
}
Re: How to give to all cops 100$ when a player with wanted dead?:D -
Deathh - 31.07.2013
tell us your enum or callback for cops.
Re: How to give to all cops 100$ when a player with wanted dead?:D -
wumpyc - 31.07.2013
OnPlayerDeath... then loop trough all players and if they are cops give them 100$
pretty much simple :P