Filterscript - 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 (
/showthread.php?tid=449107)
Filterscript -
Shadoww5 - 07.07.2013
How can I check if a filterscript is loaded ?
I tried CallRemoteFunction but it requires parameters and they aren't necessary.
Re: Filterscript -
GODEX - 07.07.2013
Umm..... Go to your server console and see if it says it has loaded, If its not working then something is wrong with it
Re: Filterscript -
Shadoww5 - 07.07.2013
There's a command on my gamemode but i just want it works if a filterscript is loaded. Do you understand me now?
AW: Filterscript -
Nero_3D - 07.07.2013
Use propertys or any other variable which can be accessed on all scripts
pawn Код:
// In your Filterscript
stock const
FilterScriptName[] = "FS_Test"
;
public OnFilterScriptInit() {
setproperty(.name = FilterScriptName, .value = gettime()); // the value doesnt matter, just not 0
}
public OnFilterScriptExit() {
deleteproperty(.name = FilterScriptName);
}
pawn Код:
// In any other filterscript or in your gamemode
#define IsLoaded( getproperty(.name = // somewhere over the first usage
// in your command
if(IsLoaded("FS_Test")) {
SendClientMessage(playerid, -1, "Test Filterscript is loaded!");
}