Disabling Commands
#1

if i disable commands in one filterscript , will the change take place for all filterscripts ??

as in ..

if i disable commands from filterscript 1 , and filterscript 2 also have some commands will they get disabled as well ? if not then how am i supposed to go about this ?
Reply
#2

Disable you mean remove ? if your all FS's have same cmd ? than you to remove them all.....
Reply
#3

disable as in , not able to use ingame , for a certain period of time , for example while in a minigame
Reply
#4

Your filterscript use OnPlayerCommandText or ZCMD system?
Reply
#5

dcmd
Reply
#6

You could create a variable like
pawn Код:
if(pVariables[playerid][pGame] == 1) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while in an minigame.");
Reply
#7

Quote:
Originally Posted by Lido
Посмотреть сообщение
You could create a variable like
pawn Код:
if(pVariables[playerid][pGame] == 1) return SendClientMessage(playerid, COLOR_RED, "You can't use this command while in an minigame.");
but will this disable use of commands which are there in other filterscripts ?
Reply
#8

You could have to put this in every command you want to disable, could you please show me an example of a command you are trying to disable, also how does your gamemode load/save data? Aswell as the command that they enter, a minigame, and last could I have your player variables.
Reply
#9

@Lido theres other way to make it more easier like this

pawn Код:
new DisableCMD[MAX_PLAYERS];

//OnPlayerCommandText (Also put this on Filterscript that you want to disable a command)

if(DisableCMD[playerid] == 1) return //you want to do to players attempting to use command
//^^^ add this at after the '{' brackets of OnPlayerCommandText

//Commands MiniGame

DisableCMD[playerid] = 1;

//Commands leave

DisableCMD[playerid] = 0;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)