Disable all Commands Except...
#8

Quote:
Originally Posted by Roko_foko
View Post
That depends on scripter(you). If you want to disable the commands after player go to some other place(or after they killed someone, or after they have been prisoned, or any other YOUR reason) via command (or entering check point, or idk... picking pickup) just put
pawn Code:
gCommandsDisabled[playerid]=true;
and they wont be able to use that commands.

for example I don't want player to /suicide after he uses command /teleport, but if really needed player can use command /sorry to enable commands:
pawn Code:
OnPlayerCommandText(playerid,cmdtext[])
{
     if(strcmp(cmdtext,"/teleport")==0)
     {
         SetPlayerPos(playerid,0,1,2);
         gCommandsDisabled[playerid]==true;
         return 1;
     }
     if(strcmp("/suicide",cmdtext)==0)
     {
         if(gCommandsDisabled[playerid]==true)return SendClientMessage(playerid,0xFF0000FF,"More luck next time!");
         SetPlayerHealth(playerid,0);
         return 1;
     }
     if(strcmp("/sorry",cmdtext)==0)
     {
         gCommandsDisabled[playerid]==false;
         return 1;
     }
}
Thanks but i dont want player to type manual if they want to enable or disable their commands even I.

Okay to make it simple.

I only want to disable /t -teleport command in drag. If you can see on my first post.

If player tried to use /t- teleport a DIALOG_STYLE_MSGBOX will show "You can't use teleport while in Drag" "Leave" "Stay"

If player click Leave - He will die and respawn in different spawn place.
If player click stay - Dialog will close and he/she still in drag area.
Reply


Messages In This Thread
Disable all Commands Except... - by kbalor - 13.07.2012, 20:53
Re: Disable all Commands Except... - by Roko_foko - 13.07.2012, 20:58
Re: Disable all Commands Except... - by kbalor - 13.07.2012, 21:00
Re: Disable all Commands Except... - by Roko_foko - 13.07.2012, 21:00
Re: Disable all Commands Except... - by kbalor - 13.07.2012, 21:10
Re: Disable all Commands Except... - by Larceny - 13.07.2012, 21:21
Re: Disable all Commands Except... - by Roko_foko - 13.07.2012, 21:23
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 09:35
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 10:01
Re: Disable all Commands Except... - by Roko_foko - 14.07.2012, 10:14
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 12:44
Re: Disable all Commands Except... - by Mark™ - 14.07.2012, 12:47
Re: Disable all Commands Except... - by Blunt - 14.07.2012, 12:48
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 12:56
Re: Disable all Commands Except... - by Mark™ - 14.07.2012, 13:00
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 13:06
Re: Disable all Commands Except... - by Mark™ - 14.07.2012, 13:09
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 13:15
Re: Disable all Commands Except... - by Mark™ - 14.07.2012, 13:17
Re: Disable all Commands Except... - by Andi_Evandy - 14.07.2012, 13:27
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 13:28
Re: Disable all Commands Except... - by Mark™ - 14.07.2012, 13:33
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 13:39
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 13:42
Re: Disable all Commands Except... - by kbalor - 14.07.2012, 14:21
Re: Disable all Commands Except... - by Roko_foko - 14.07.2012, 22:00

Forum Jump:


Users browsing this thread: 1 Guest(s)