SA-MP Forums Archive
Reloading a filterscript from inside itself - 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: Reloading a filterscript from inside itself (/showthread.php?tid=312878)



Reloading a filterscript from inside itself - MP2 - 23.01.2012

I have a sort of RCON filterscript, because I don't want to risk using proper RCON, and I want to make '/admin reload' reload said filterscript. You can't just "reloadfs admin" from the admin FS because it crashes the server, so I tried this:

'admin' FS:

pawn Код:
SendRconCommand("loadfs admin_reload");

// In the '/admin reload' command
'admin_reload' FS:

pawn Код:
public OnFilterScriptInit()
{
    SendRconCommand("reloadfs admin");
}
'admin' FS:

pawn Код:
public OnFilterScriptInit()
{
    SendRconCommand("unloadfs admin_reload");
    // Other stuff
}
But it seems to have problems. I also tried a timer in the admin_reload filterscript, but it crashed the server.


Re: Reloading a filterscript from inside itself - MP2 - 23.01.2012

I'll have to make a command in my GM to reload it then. Thanks for your reply.