Need to show kills
#5

You should check if 'killerid' is not INVALID_PLAYER_ID, otherwise your server will crash...
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID) return 1;
    new string[12];
    if(pInfo[killerid][Team] == 1)
    {
        MapKillsSoldiers++;
        format(string, sizeof (string), "%i", MapKillsSoldiers);
        TextDrawSetString(Textdraw12, string); // Change "Textdraw12" to your MapKillsSoldiers textdraw ID.
    }
    if(pInfo[killerid][Team] == 2)
    {
        MapKillsTerrorists++;
        format(string, sizeof (string), "%i", MapKillsTerrorists);
        TextDrawSetString(Textdraw13, string); // Change "Textdraw13" to your MapKillsTerrorists textdraw ID.
    }
    return 1;
}
Reply


Messages In This Thread
Need to show kills - by Phyzic - 18.08.2014, 10:19
Re: Need to show kills - by jidavid - 18.08.2014, 10:28
Re: Need to show kills - by Stinged - 18.08.2014, 10:32
Re: Need to show kills - by Phyzic - 18.08.2014, 10:42
Re: Need to show kills - by Threshold - 18.08.2014, 11:05

Forum Jump:


Users browsing this thread: 1 Guest(s)