onplayerdeath
#1

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.

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;
}
Thanks.

-Mike.
Reply


Messages In This Thread
onplayerdeath - by [NYRP]Mike. - 03.10.2009, 22:04
Re: onplayerdeath - by brett7 - 03.10.2009, 22:21
Re: onplayerdeath - by [NYRP]Mike. - 03.10.2009, 22:36
Re: onplayerdeath - by [NYRP]Mike. - 03.10.2009, 22:46
Re: onplayerdeath - by _Vortex - 03.10.2009, 22:53
Re: onplayerdeath - by Enzo_Ferrari_V12 - 04.10.2009, 02:27

Forum Jump:


Users browsing this thread: 1 Guest(s)