20.07.2011, 22:41
is there any way of creating a timer without using forwards and new publics?
Thanks
Thanks
new TimeAlive[MAX_PLAYERS];
//OnPlayerSpawn
TimeAlive[playerid] = tickcount();
//OnPlayerDeath
TimeAlive[playerid] = tickcount() - TimeAlive[playerid];
//OnPlayerSpawn
TimeAlive[playerid] = 0; // resets the tracker
//Timer which gets called each second
for(new i; i < MAX_PLAYERS; ++i) {
TimeAlive[i]++;
}