Question -
Kyance - 08.02.2014
How do you stop the weather/time changes?
If i try setting /settime 7 ( For an example ), then after 4 - 10 seconds, the server will automatically change it.
Couldn't find a feature how to stop the time/weather rotation/changes ..
Re: Question -
FireCat - 08.02.2014
pawn Код:
if(!strcmp(cmdtext, "/setweather"))
{
if(cmdtext[9] == "" || cmdtext[9] == " ")
return SendClientMessage(playerid, -3, "SYNTAX: /setweather <weather id>")
SetTimer("changeWeather", 5000, false);
}
forward changeWeather(iWeatherID);
public changeWeather(iWeatherID)
{
SetWeather(iWeatherID);
}
Re: Question -
Kyance - 08.02.2014
Quote:
Originally Posted by FireCat
pawn Код:
if(!strcmp(cmdtext, "/setweather")) { if(cmdtext[9] == "" || cmdtext[9] == " ") return SendClientMessage(playerid, -3, "SYNTAX: /setweather <weather id>")
SetTimer("changeWeather", 5000, false); }
forward changeWeather(iWeatherID); public changeWeather(iWeatherID) { SetWeather(iWeatherID); }
|
No no, ah, i guess i explained it wrong.
Well, my /settime command is fine, but the problem is,
that the server will change it to a random time when-ever it wants.
For an example:
[5:15:20] Server World Time is: 7
[5:15:30] * Admin
Name[ID] has changed the time to
2
[5:15:34] Server World Time is: 8
I hope you understand now :c
( I want it to be STUCK at the 2 (OR W.E) until and admin changes it again D:
Re: Question -
CuervO - 08.02.2014
There might be an internal timer in your script which handles time. Search for SetWorldTime / SetPlayerTime in your script and check where's it's being handled.
If you create a /settime command make sure it uses the script current variables or things like these will happen. For example, if your time is stored at ServerTime, use that variable when changing the time dynamically.
Re: Question -
Kyance - 08.02.2014
Quote:
Originally Posted by CuervO
There might be an internal timer in your script which handles time. Search for SetWorldTime / SetPlayerTime in your script and check where's it's being handled.
If you create a /settime command make sure it uses the script current variables or things like these will happen. For example, if your time is stored at ServerTime, use that variable when changing the time dynamically.
|
I only have "SetWorldTime" in my command:
pawn Код:
CMD:settime(playerid, params[]) {
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid, COLOR_RED, "[ADMIN] - You're not a high enough level to use this command!");
new h;
if(sscanf(params, "i", h)) return SendClientMessage(playerid, COLOR_RED, "[USAGE] - /settime [0-24]");
if ( h < 0 || h > 24 ) return SendClientMessage( playerid, COLOR_RED, "[ERROR] - Use a number from 0 to 24" );
new name[MAX_PLAYER_NAME];
new string[94];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[TIME] - Admin %s[%d] has set the time to %i!", name, playerid, h);
SendClientMessageToAll(COLOR_GREEN, string);
format(string, sizeof(string), "[ADMIN] - %s[%d] has used SETTIME( %i )", name, playerid, h);
SendMessageToAdmins(COLOR_LIME,string);
SetWorldTime(h);
return 1;
}
.. ;d
Re: Question -
CuervO - 08.02.2014
If this is being printed: "Server World Time is: ", search where it is being printed. It might be also a filterscript.
Make sure you disabled native GTA time too. (
https://sampwiki.blast.hk/wiki/TogglePlayerClock)
Re: Question -
Kyance - 08.02.2014
Quote:
Originally Posted by CuervO
|
Na, that "Server World Time ..." was just an example by myself.
Anyways:
filterscripts gl_actions
gl_realtime gl_property gl_mapicon ls_mall attachments skinchanger vspawner
Could the "realtime" be causing it?
Re: Question -
CuervO - 08.02.2014
I have no knowelge of such scripts but yeah, try removing it or unloading it and check if your command works by then.
Re: Question -
Kyance - 08.02.2014
Quote:
Originally Posted by CuervO
I have no knowelge of such scripts but yeah, try removing it or unloading it and check if your command works by then.
|
Now it works, thanks