SA-MP Forums Archive
Filterscript being called from a gamemode. - 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: Filterscript being called from a gamemode. (/showthread.php?tid=424446)



Filterscript being called from a gamemode. - Denying - 22.03.2013

Oh well, I've been trying to make a command which uses OnFilterScriptInit callback but the problem is that I need that certain callback to be called on OnGameModeInit callback, so what I wanted to ask is if I use the following command under OnGameModeInit will activate OnFilterScriptInit of the selected filterscript.
SendRconCommand("loadfs FILTERSCRIPT");

Will it?


Re: Filterscript being called from a gamemode. - Vince - 22.03.2013

Yes, it'll activate OnFilterScriptInit, but you can't load a filterscript that's already loaded.

Take a look at CallRemoteFunction.


Re: Filterscript being called from a gamemode. - Denying - 22.03.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
Yes, it'll activate OnFilterScriptInit, but you can't load a filterscript that's already loaded.

Take a look at CallRemoteFunction.
Ehm, I tried adding it on the filterscripts in server.cfg, but it was not called. ( I assume so as the function did not work/happen )

I tried using CallRemoteFunction, I can't understand it. :/

Thank you for the reply though.