How to turn Filterscript on/off by command, no rcon! - 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: How to turn Filterscript on/off by command, no rcon! (
/showthread.php?tid=595165)
How to turn Filterscript on/off by command, no rcon! -
Beasthian - 29.11.2015
So lets say i type /anticbugon
This turns the anticbug Filterscript on and /anticbugoff. this turns anti cbug off. Any help?
Re: How to turn Filterscript on/off by command, no rcon! -
Golimad - 29.11.2015
CMD:anticbugon ....
{
SendRconCommand("loadfs anticbugon"); // replace anticbug on with your fs name
}
SendRconCommand("unloadfs anticbugon"); // to turn it off.
Re: How to turn Filterscript on/off by command, no rcon! -
Beasthian - 29.11.2015
Thanyou very much!!!
But how about this time I paste the anticbug system in to the gamemode. how could i disable or enable that.
Re: How to turn Filterscript on/off by command, no rcon! -
Golimad - 02.12.2015
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..
}
Re: How to turn Filterscript on/off by command, no rcon! -
gurmani11 - 02.12.2015
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;
}