19.01.2014, 19:19
I made jail system but players can teleport out easily.
How to disable commands but not chat in jail?
I am using ZCMD!
How to disable commands but not chat in jail?
I am using ZCMD!
public OnPlayerCommandReceived(playerid, cmdtext[]) //return 0 to disable commands
// Put this somewhere in your jail CMD.
SetPVarInt(playerid, "Caged", = 1);
// Put this in each teleport CMD.
if(GetPVarInt(playerid, "Caged") == 1) return SendClientMessage(playerid, -1, "You cannot use this command when you're jailed.");
pawn Код:
pawn Код:
|
new playerinjail[MAX_PLAYERS];
if(playerinjail[playerid] == 1) { SendClientMessage(0xFFFFFF,"You can't use this command in jail!" } else { SetPlayerPos.... }