[HELP]OnPlayerDeath! - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]OnPlayerDeath! (
/showthread.php?tid=101157)
[HELP]OnPlayerDeath! -
[NYRP]Mike. - 08.10.2009
Hey SA:MP, I was just wondering how i could do this. I tried several ways but still couldnt get it right, thought it maybe time to ask for help.
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(TEAM_COP[playerid] == 1)
{
if(TEAM_PRIS[killerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, " You have now got Police Keys, You can open all doors");
CopKeys(playerid);
GameTextForPlayer(playerid, "~p~Police Keys: ~g~GAINED", 2000, 1);
}
return 1;
}
I just want it so if your TEAM_COP, and killerid is TEAM_PRIS, then it gives them police keys, but it doesnt seem to work for me, Maybe you can help?
Thanks.
-Mike.
Re: [HELP]OnPlayerDeath! -
HuRRiCaNe - 08.10.2009
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(TEAM_COP[playerid] == 1&&TEAM_PRIS[killerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, " You have now got Police Keys, You can open all doors");
CopKeys(playerid);
GameTextForPlayer(playerid, "~p~Police Keys: ~g~GAINED", 2000, 1);
return 1;
}
return 1;
}
Re: [HELP]OnPlayerDeath! -
[NYRP]Mike. - 08.10.2009
Still wont work, its sending the messages to the cop not the Prisoner.
-Mike.
Re: [HELP]OnPlayerDeath! -
ilikepie2221 - 08.10.2009
pawn Код:
{
if(TEAM_COP[playerid] == 1&&TEAM_PRIS[killerid] == 1)
{
SendClientMessage(killerid, COLOR_YELLOW, " You have now got Police Keys, You can open all doors");
CopKeys(killerid);
GameTextForPlayer(killerid, "~p~Police Keys: ~g~GAINED", 2000, 1);
return 1;
}
return 1;
}
Try that.
Re: [HELP]OnPlayerDeath! -
[NYRP]Mike. - 08.10.2009
Thanks guys working Fine.
Re: [HELP]OnPlayerDeath! -
Enzo_Ferrari_V12 - 09.10.2009
lol mike, you shoulda asked me I woulda helped