[Help] Day and night problem - 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] Day and night problem (
/showthread.php?tid=184976)
[Help-SOlved] Day and night problem -
Rainbow_Six - 22.10.2010
Ok so my server is a GMT+3 server and when in my country is night in my server is daylight and I want to make when in my country is day the server does the same and the night also ... any ideea of what it may be ? I know its a n00bish question
Oh and the clock is the same as in my country but the day/night are so f***ing wrong
Respuesta: [Help] Day and night problem -
The_Moddler - 22.10.2010
Look for SetWorldTime.. or SetPlayerTime.
Re: [Help] Day and night problem -
Rainbow_Six - 22.10.2010
May this be the problem
new wtime = 15; ?
If yes how can I set it to correspond with GMT+3 ?
Re: [Help] Day and night problem -
Kwarde - 22.10.2010
Try this
new wtime = 15+2; or
new wtime = 15+3 - idk in what GMT sa:mp is working. I guess just on the place where the server's located..
If it's standard 'GMT+1' it should be +2

Or whatever, Just try something out

- And by 'gettime' use this. no wait, I'll make an example
pawn Код:
#include <a_samp>
new hours,minutes,seconds;
forward UpdateTime();
public OnFilterScriptInit()
{
SetTimer("UpdateTime", 1000, true);
return 1;
}
public UpdateTime()
{
gettime(hours+2, minutes, seconds); //or: gettime(hours+3, minutes, seconds); Just try out
for(new i = 0; i < MAX_PLAYERS; i++){
if(IsPlayerConnected(i)){
SetPlayerTime(i, hours, minutes);
}
}
return 1;
}
Is this what you want?
p.s.
Rainbow 6 Vegas is cool xD
Respuesta: [Help] Day and night problem -
The_Moddler - 22.10.2010
Or make your own time script without gettime..
Re: [Help] Day and night problem -
Rainbow_Six - 23.10.2010
Solved...