ScoreTimer only works for ID 0 (or the first player connects)
#3

just loop through connected players.

pawn Код:
porward ScoreTimer(playerid);
public ScoreTimer(playerid)
{
    for(new l = GetMaxPlayers(); playerid < l; ++playerid) {
        if(IsPlayerConnected(playerid)) {
            AccInfo[playerid][pSecondScore] += 1;
            if(AccInfo[playerid][pSecondScore] >= SCORE_TIME) {
                SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
                AccInfo[playerid][pSecondScore] = 0;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
ScoreTimer only works for ID 0 (or the first player connects) - by kbalor - 17.08.2012, 17:24
Re: ScoreTimer only works for ID 0 (or the first player connects) - by Dan. - 17.08.2012, 17:51
Re: ScoreTimer only works for ID 0 (or the first player connects) - by leonardo1434 - 17.08.2012, 17:58
Re: ScoreTimer only works for ID 0 (or the first player connects) - by kbalor - 17.08.2012, 18:29

Forum Jump:


Users browsing this thread: 1 Guest(s)