How to turn Filterscript on/off by command, no rcon!
#1

So lets say i type /anticbugon
This turns the anticbug Filterscript on and /anticbugoff. this turns anti cbug off. Any help?
Reply
#2

CMD:anticbugon ....
{
SendRconCommand("loadfs anticbugon"); // replace anticbug on with your fs name
}

SendRconCommand("unloadfs anticbugon"); // to turn it off.
Reply
#3

Thanyou very much!!!

But how about this time I paste the anticbug system in to the gamemode. how could i disable or enable that.
Reply
#4

use bool type and when
bool antibug_state;
#define ANTIBUG_ON true
#define ANTIBUG_OFF false

cmd:toggleantibug
{
if(antibug_state==ANTIBUG_ON)
antibug_state=ANTIBUG_OFF;
else
antibug_state=ANTIBUG_ON;
}

cmd:antibugcmd
{
if(antibug_state==ANTIBUG_OFF) return 0; // return something or w/e or just do else and execute your code..
}
Reply
#5

PHP код:
CMD:toggleanticbug(playerid,params[])
{
    if(!
GetPVarInt(playerid,"AntiCbug"))
    {
        
SetPVarInt(playerid,"AntiCbug",true);
        
SendClientMessage(playerid,0x00FF00FF,"» Anti-C-Bug « Anti-C-bug system Toggeled On!");
    }
    else
    {
        
DeletePVar(playerid,"AntiCbug");
        
SendClientMessage(playerid,0xFF0000FF,"» Anti-C-Bug « Anti-C-bug system Toggeled Off!");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)