Search for script - 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)
+--- Thread: Search for script (
/showthread.php?tid=307171)
Search for script -
euro2cz - 29.12.2011
Hello, I'm looking for a script where the timer is at 1 minute, and there is every minute changes the time on the +1 and when the time will be 24 then it set back to 0
____________________
Sorry For my bad english, Im from Czech Republic
Re: Search for script -
Lуs - 29.12.2011
Look for gettime.
Re: Search for script -
euro2cz - 29.12.2011
I cant find it and im new in pwn and i need this to begin my first gamemode pls somebody tell me how to create this?
Re: Search for script -
Lуs - 29.12.2011
pawn Код:
new hour, minute, second;
gettime(hour, minute, second);
https://sampwiki.blast.hk/wiki/Gettime
Re: Search for script -
euro2cz - 29.12.2011
Thanks , I try it
Re: Search for script -
AndreT - 29.12.2011
Los, I doubt he will find gettime of much use. What he is looking for is a one minute timer which increments a value by one every time it is called and then updates the server time.
What this could look like:
pawn Код:
new CurrentHour;
public OnGameModeInit()
{
SetTimer("UpdateTime", 60000, true);
}
forward UpdateTime();
public UpdateTime()
{
CurrentHour ++;
if(CurrentHour == 24) CurrentHour = 0;
SetWorldTime(CurrentHour);
}
Re: Search for script -
euro2cz - 29.12.2011
Yes, this is what i search for, THANKS!