Allow one command
#1

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?
Reply
#2

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!");
Reply
#3

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)