31.01.2019, 23:53
- Player Timers
Quote:
Example: when player has logged-in into his/hers load's his time spent and proceeding with the timer, later on when the player left the server by quitting saving time and killing the player timer for each specific player |
Код:
ptask PlayingTime[1000](playerid) { if(IsPlayerConnected(playerid)) { Player[playerid][Seconds]++; if(Player[playerid][Seconds] == 59) { Player[playerid][Seconds] = 0; Player[playerid][Minutes]++; } else if(Player[playerid][Minutes] == 59) { Player[playerid][Minutes] = 0; Player[playerid][Hours]++; } } return 1; }