03.01.2010, 11:57
I'm trying to make a clock with unrealtime... This time needs to change every 2.3 minits to 1 hour later, and at 23 hours it restarts at 0...
i have got this for now...
It isnt working correctly because the timer doesnt at 1 hour every 2.3minits, it just stays at 1....
Anyone help....
i have got this for now...
Quote:
new unrealtime; public OnGameModeInit() { SetTimer("unrealtime",1500,true); //MAKES THE TIMER if (unrealtime > 23) { unrealtime = 0; } return 1; } CMD:time(playerid, params[]) /// COMMAND TO SEE THE TIMER { new string[128]; format(string,sizeof(string),"current hour is %d",GetUnrealHour()); SendClientMessage(playerid,0xDAA520FF,string); } stock PlusUnrealTime() //ADD 1 HOUR { unrealtime = unrealtime + 1; return unrealtime; } stock GetUnrealHour() ///SHOWS THE UNREALTIME { return unrealtime; } |
Anyone help....