03.10.2009, 22:04
Hello SA:MP forum, i was wondering how i could do this, what i want is if TEAM_PRIS kills TEAM_COP they gain TEAM_COPKeys and displays a textdraw, here is my code.
Thanks.
-Mike.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(TEAM_PRIS[killerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, " You have now got Police Keys, You can open all doors");
TEAM_COPKeys[playerid] = 1;
GameTextForPlayer(playerid, "~p~Police Keys: ~g~GAINED", 2000, 1);
TextDrawShowForPlayer(playerid, Text:Textdraw2);
TextDrawHideForPlayer(playerid, Text:Textdraw6);
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, " You have now lost your Police Keys.");
TEAM_COPKeys[playerid] = 0;
GameTextForPlayer(playerid, "~p~Police Keys: ~R~LOST", 2000, 1);
TextDrawShowForPlayer(playerid, Text:Textdraw6);
TextDrawHideForPlayer(playerid, Text:Textdraw2);
}
return 1;
}
-Mike.