Disable all Commands Except...
#7

Quote:
Originally Posted by kbalor
View Post
im confused. So I can't use /suicide command everywhere?

Edit: What if i leave /drag and go to other place like /aa, Can suicide automatically enabled in /aa??
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;
     }
}
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: 3 Guest(s)