how to change severtime - 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: how to change severtime (
/showthread.php?tid=329790)
how to change severtime -
Lazy_Duck - 30.03.2012
hi
how can i change severtime (for ex to GMT + 1)
GetTime() returns a wrong time
and the time in logs is false too
Re: how to change severtime -
Shabi RoxX - 30.03.2012
GetTime() returns your computer/host Real time....
Server Time can be set with SetWorldTime(time);//time will be hours 0-24
Here's a command to set server time.... It uses ZCMD , and sscanf
pawn Код:
CMD:settime(playerid,params[])
{
new time;//var to store value we will enter
if(IsPlayerAdmin(playerid))//only for rcon time
{
if(sscanf(params,"i",time)) return SendClientMessage(playerid, C_GRAD, "Format: /Settime [hours]");
else SetWorldTime(time);
}
return 1;
}
Re: how to change severtime -
Lazy_Duck - 30.03.2012
if i use SetWorldTime ,Gettime will return a diffrent value?
Re: how to change severtime -
Shabi RoxX - 30.03.2012
Quote:
Originally Posted by Hussen.
if i use SetWorldTime ,Gettime will return a diffrent value?
|
GetTime returns computer time in which server is running...... The time you can see on right bottom of your desktop.....
Re: how to change severtime - HuSs3n - 30.03.2012
post removed