Problem with checking who has the highest killing spree
#5

pawn Код:
public BersekCheck()
{
    new index;
    index = 0;
    for(new i=0; i< MAX_PLAYERS; i++) // foreach would be better
    {
        if(playerVariables[i][pCurrentSpree] > playerVariables[index][pCurrentSpree])
            index = i;
    }
    new pname[MAX_PLAYER_NAME];
    new szMessage[128];
    GetPlayerName(index, pname, MAX_PLAYER_NAME);
    format(szMessage, sizeof(szMessage), "[%d]%s is a menace and has turned into bersek, killing them will earn extra money.", index, pname);
    SendClientMessageToAll(COLOR_RED, szMessage);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)