Little explanation for what happens.
If a player dies on last round the RoundStart() event treats him as dead.
Here's my code:
PHP Code:
public RoundStart() {
new iPlayers[32], iNum;
get_players( iPlayers, iNum, "a"); //This do not include dead players
for( new i; i <= iNum; i++ ) {
new iPid = iPlayers[i]
Rounds[iPid]++;
SaveKills(iPid); //This saves rounds to SQL database, if a player was dead on last round it doesn't. It works for everyone who was alive last round.
}
return PLUGIN_CONTINUE;
}
So when I do with set_task it works fine:
PHP Code:
public RoundStart() {
set_task(1.0, "SaveRounds");
return PLUGIN_CONTINUE;
}
public SaveRounds() {
new iPlayers[32], iNum;
get_players( iPlayers, iNum, "a");
for( new i; i <= iNum; i++ ) {
new iPid = iPlayers[i]
Rounds[iPid]++;
SaveKills(iPid);
}
return PLUGIN_CONTINUE;
}
Bug or I am doing something wrong here?
__________________