SA-MP Forums Archive
Allow one command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Allow one command (/showthread.php?tid=332759)



Allow one command - bleedis - 09.04.2012

Hey.
I have a question like, When u have this under onplayercomandtext
Код:
    if(PlayerInfo[playerid][Jailed] == 1 && PlayerInfo[playerid][Level] <= 4) return
	    SendClientMessage(playerid,COLOR_GREY,"You cant use any command while in jail!");
You cant use any command. But how to create command who you can use in jail? like /bribe to pay for jail and get out?


Re: Allow one command - Shabi RoxX - 09.04.2012

Try this :

pawn Код:
if(PlayerInfo[playerid][Jailed] == 1 && PlayerInfo[playerid][Level] <= 4 && strcmp(cmdtext,"/bribe",false)) return // so if cmdtext is not /bribe
        SendClientMessage(playerid,COLOR_GREY,"You cant use any command while in jail!");



Re: Allow one command - bleedis - 09.04.2012

Thanks!