SA-MP Forums Archive
[HELP] UnrealTime - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] UnrealTime (/showthread.php?tid=118424)



[HELP] UnrealTime - screw - 03.01.2010

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...

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;
}

It isnt working correctly because the timer doesnt at 1 hour every 2.3minits, it just stays at 1....

Anyone help....