15.02.2014, 20:25
(
Last edited by Whitetiger; 15/02/2014 at 11:15 PM.
)
TIL GetPlayerTime is just a server-sided value meaning:
if the user is using a speedhack (via cheat engine for example) it will return an increase of only 5 seconds no matter what even if your time is completely different on client-side.
pawn Code:
public OnPlayerSpawn(playerid) {
SetPlayerTime(playerid, 7, 0);
TogglePlayerClock(playerid, 1);
SetTimerEx("ClockUpdate", 5000, 0, "d", playerid);
}
forward ClockUpdate(playerid);
public ClockUpdate(playerid) {
new hour, minute;
GetPlayerTime(playerid, hour, minute);
printf("%02d:%02d", hour, minute);
}