[HELP]OnPlayerDeath!
#1

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.
Reply
#2

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;
}
Reply
#3

Still wont work, its sending the messages to the cop not the Prisoner.

-Mike.
Reply
#4

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.
Reply
#5

Thanks guys working Fine.
Reply
#6

lol mike, you shoulda asked me I woulda helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)