11.08.2012, 20:07
Anyone know how to set this to 1 hour = 1 score?
Код:
#define SCORE_TIME 60 * 3
pawn Код:
forward ScoreTimer();
public ScoreTimer()
{
new pTime[4];
for(new i; i < MAX_PLAYERS; i++)
{
TotalGameTime(i, pTime[0], pTime[1], pTime[2]);
pTime[3] = (pTime[0] * 3600) + (pTime[1] * 60) + pTime[2];
if((pTime[3] - LastConnected[i]) == SCORE_TIME)
{
SetPlayerScore(i, GetPlayerScore(i) + 1);
LastConnected[i] = pTime[3];
}
}
return 1;
}