11.05.2014, 13:15
require y_timers, foreach
Add pCSecs, pLevel to your enum
Add pCSecs, pLevel to your enum
pawn Код:
// UPDATE Player connect time per secs
task UpdatePerSecs[1000]()
{
foreach(new i : Player)
{
PlayerInfo[i][pCSecs]++;
// 1 hours
if(PlayerInfo[i][pCSecs] >= 3600)
{
PlayerInfo[i][pCSecs] -= 3600;
PlayerInfo[i][pLevel]++;
SetPlayerScore(playerid, PlayerInfo[i][pLevel]);
}
}
}