BlockCommand [+REP]
#2

There is probably better and more advanced ways to do this but I'll give you a simple soloution.
PS: This is just pseudo code.
Код:
new bool:CanUseStats[MAX_PLAYERS];

In command /stats
{
     if(!CanUseStats[playerid]) return SendClientMessage(playerid, 0x0000FF, "You can't use this command!);
}

In /blockcmd
{
  Use scanf to deal with params, you will need two, the player id and the command to block
    if(!strcmp(cmd, "stats", true))
    {
         CanUseStats[player] = false;
    }
}
You can work based on that now to block any cmd you want.
Reply


Messages In This Thread
BlockCommand [+REP] - by arlindi - 20.03.2015, 21:52
Re: BlockCommand [+REP] - by mirou123 - 20.03.2015, 22:03
Re: BlockCommand [+REP] - by arlindi - 20.03.2015, 22:26
Re: BlockCommand [+REP] - by mirou123 - 20.03.2015, 23:47
Re: BlockCommand [+REP] - by arlindi - 21.03.2015, 08:16
Re: BlockCommand [+REP] - by mirou123 - 21.03.2015, 09:30
Re: BlockCommand [+REP] - by arlindi - 21.03.2015, 10:32
Re: BlockCommand [+REP] - by mirou123 - 21.03.2015, 12:04
Re: BlockCommand [+REP] - by Threshold - 22.03.2015, 11:09
Re: BlockCommand [+REP] - by arlindi - 22.03.2015, 15:07

Forum Jump:


Users browsing this thread: 1 Guest(s)