Server Restart 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: Server Restart problem (
/showthread.php?tid=192787)
Server Restart problem -
multinfs - 23.11.2010
I got a problem cuz when i usually add something i need to restart the server but with /rcon gmx it just reloads the gamemode, but i want the whole server and all filterscripts to be reloaded...every time i need to close server and reopen it and i hate it soo much cuz it take so long and all players need to close their SA and join again....that sux, so if someone knows a way to make a filterscript that reloads the gamemode and ALL filterscripts set in the server.cfg then i would be very greatful!so please help!
Re: Server Restart problem -
Zh3r0 - 23.11.2010
Just type ''gmx'' in the console without '' ''.
Re: Server Restart problem -
Ash. - 23.11.2010
Quote:
Originally Posted by multinfs
I got a problem cuz when i usually add something i need to restart the server but with /rcon gmx it just reloads the gamemode, but i want the whole server and all filterscripts to be reloaded...every time i need to close server and reopen it and i hate it soo much cuz it take so long and all players need to close their SA and join again....that sux, so if someone knows a way to make a filterscript that reloads the gamemode and ALL filterscripts set in the server.cfg then i would be very greatful!so please help!
|
In your gamemode, under OnGameModeInit() - have this:
pawn Код:
public OnGameModeInit()
{
SendRconCommand("reloadfs {scriptname without .amx}"); // Do this for how ever many scripts you need to reload.
}
Re: Server Restart problem -
Camacorn - 23.11.2010
Quote:
Originally Posted by funky1234
In your gamemode, under OnGameModeInit() - have this:
pawn Код:
public OnGameModeInit() { SendRconCommand("reloadfs {scriptname without .amx}"); // Do this for how ever many scripts you need to reload. }
|
If that doesnt work just put 'loadfs' instead.
Re: Server Restart problem -
Ash. - 23.11.2010
Quote:
Originally Posted by Camacorn
If that doesnt work just put 'loadfs' instead.
|
Loadfs wont work, if a script is already loaded it wont 'load' again
Re: Server Restart problem -
StreetGT - 23.11.2010
why you don't create /GMX command for Admins?
Re: Server Restart problem -
multinfs - 24.11.2010
Quote:
Originally Posted by funky1234
In your gamemode, under OnGameModeInit() - have this:
pawn Код:
public OnGameModeInit() { SendRconCommand("reloadfs {scriptname without .amx}"); // Do this for how ever many scripts you need to reload. }
|
hmmm it looks good but if you add a FS to your server you will have to add/remove a line here too...
I will try to make a cmd that reads from the server.cfg file but i dont really konw how to read a single line and remove the Filterscripts at beginning and adding .amx at end tho... but you could too make a single FS that loads all the other scripts, it would be better i think...