[HELP]Top 5 Killers
#2

pawn Код:
new topkills[5], kills[MAX_PLAYERS], name[MAX_PLAYER_NAME];

OnPlayerDeath(playerid, killerid, reason)
{
    kills[killerid]++;
    for(new i = 0; i < 5; i++)
    {
        if(kills[killerid] > topkills[i])
        {
            topkills[i] = kills[killerid];
            GetPlayerName(killerid, name, sizeof(name));
        }
    }
    return 1;
}
Something like this, this raise a player's kill whenever he kills someone, will check if one in the top 5 kills has killed that much, if no it will replace it, and it will get the player's name if he has killed more than one of the top 5 killers, do with that whatever you want, want to save the name somewhere? do it. You can just modify it/add things to it however you want, if you need more help, tell me.

( It is not tested, I wrote it here in this chat )
Reply


Messages In This Thread
[HELP]Top 5 Killers - by [R]ambo - 16.03.2013, 21:20
Re: [HELP]Top 5 Killers - by Denying - 16.03.2013, 21:26

Forum Jump:


Users browsing this thread: 1 Guest(s)