Filterscript
#1

How can I check if a filterscript is loaded ?

I tried CallRemoteFunction but it requires parameters and they aren't necessary.
Reply
#2

Umm..... Go to your server console and see if it says it has loaded, If its not working then something is wrong with it
Reply
#3

There's a command on my gamemode but i just want it works if a filterscript is loaded. Do you understand me now?
Reply
#4

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!");
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)