HOW TO CHANGE SERVER TIME?
#1

I want to get my server time change ever hour, i mean after one hour it +1 to Server time, it is day all the time when you enter server, i want random day and night, please help me by giving me script codes for day time time script
Reply
#2

There are many clock/time script.
You can search.
Reply
#3

Please tell me which one?
Reply
#4

No need to use a script, use this:
https://sampwiki.blast.hk/wiki/TogglePlayerClock

(It doesn't work exactly as you want though.)
Reply
#5

I want everyone time same..
Reply
#6

Well, one more way..
If you are good scripter then you can dwonload any RP script from gamemodes and copy it from there.
Because it is difficult to find this script.
Reply
#7

pretty easy
pawn Код:
new // start time is 12:00
    gTime = 12 * 60
;
pawn Код:
forward SynTimer();
public SynTimer() { // one tick is one minute
    if(++gTime == (24 * 60)) {
        gTime = 0;
    }
    SetWorldTime(gTime / 60);
}
pawn Код:
// OnPlayerUpdate
    SetPlayerTime(playerid, (gTime / 60), (gTime % 60));
Now choose your time
pawn Код:
// OnGameModeInit
    SetTimer("SynTimer", YOUR_TIME, true);
Reply
#8

k i will help u say me what help do u need
Reply
#9

What do your codes do?>
Reply
#10

Here would be my try
pawn Код:
new weatherids[21] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
forward OnServerChangeWeather();
pawn Код:
SetTimer("OnServerChangeWeather", 300000, true);
pawn Код:
public OnServerChangeWeather()
{
    new azhour, azminute, azsecond;
    gettime(azhour, azminute, azsecond);
    SetWorldTime(azhour);
    new weatherid = weatherids[random(21)];
    SetWeather(weatherid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)