07.09.2018, 01:28
How could I put restrictions on commands, that is, in an event system, if I enter the event I can not use the command, I already have the variable bool. But if I use / salirevento I'll come out of it. I'm using Pawn.CMD and I really did not find help.
I tried to use this code in OnPlayerCommandReceive but not works, and in OnPlayerCommandText works but the excepcion not works with /salirevento.
I tried to use this code in OnPlayerCommandReceive but not works, and in OnPlayerCommandText works but the excepcion not works with /salirevento.
Код:
public OnPlayerCommandReceived(playerid, cmd[], params[], flags) //Not works { if(CmdBloq5[playerid] == 1) { PlayerPlaySound(playerid,1140,0.0,0.0,0.0); GameTextForPlayer(playerid,"~n~~p~Estas en un ~r~Evento ~n~~w~usa /Salirevento",3000,3); return 1; } } public OnPlayerCommandText(playerid, cmdtext[]) //Not works { if(CmdBloq5[playerid] == 1) { PlayerPlaySound(playerid,1140,0.0,0.0,0.0); GameTextForPlayer(playerid,"~n~~p~Estas en un ~r~Evento ~n~~w~usa /Salirevento",3000,3); return 1; } }