Search for script
#1

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
Reply
#2

Look for gettime.
Reply
#3

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?
Reply
#4

pawn Код:
new hour, minute, second;
gettime(hour, minute, second);
https://sampwiki.blast.hk/wiki/Gettime
Reply
#5

Thanks , I try it
Reply
#6

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);
}
Reply
#7

Yes, this is what i search for, THANKS!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)