Posts: 181
Threads: 14
Joined: Sep 2009
Reputation:
0
Okay so I can jail people properly. But I want to make it so they can't use commands while in jail. This is code that is saying that you're in jail;
if(PlayerInfo[playerid][Jailed] == 1)
Posts: 6,129
Threads: 36
Joined: Jan 2009
What do you use for commands? zcmd, dcmd, OnPlayerCommandText with strcmp/strtok?
Posts: 715
Threads: 47
Joined: Mar 2011
Reputation:
0
if zcmd, put it on the start of "OnPlayerCommandRecieved".
if dcmd/onplayercommandtext(strcmp), put it at the start of "OnPlayerCommandText"
if ycmd, do the same as zcmd.
Posts: 6,129
Threads: 36
Joined: Jan 2009
You need to return 0.
pawn Код:
if(PlayerInfo[playerid][Jailed] == 1) {
SendClientMessage(playerid, 0, "You can't use this command inside prison.");
return 0;
}