Question!
#6

if you want to disable commands that are in the gamemode, just put OnPlayerCommandText in the filterscript, and return 1 after detecting the command.
pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    new cmd[128],idx;
    cmd = strtok(cmdtext, idx);
    if(!strcmp(cmd,"/s",true))
    {
         SendClientMessage(playerid,0xFFAAFF00,"Command disabled for event");
         return 1; //return 1 will stop the callback in your GM
     }
     return 0;
}
obviously it depends what command system you use.

If you only want to block the commands for the players in the minigame, then assuming your filterscript keeps track of the players, it is quite easy to put in a check before the 'return 1;' above that will 'return 0;' if they are not involved in the minigame.
Reply


Messages In This Thread
Question! - by ColdXX - 11.09.2010, 17:48
Re: Question! - by PotH3Ad - 11.09.2010, 17:52
Re: Question! - by ColdXX - 11.09.2010, 17:54
Re: Question! - by PotH3Ad - 11.09.2010, 18:00
Re: Question! - by ColdXX - 11.09.2010, 18:04
Re: Question! - by Rachael - 11.09.2010, 18:07
Re: Question! - by ColdXX - 11.09.2010, 18:37

Forum Jump:


Users browsing this thread: 1 Guest(s)