Код:
new bool:ChatCmd_Enable;
CMD:desativar(playerid)
{
ChatCmd_Enable = (ChatCmd_Enable ? false : true);
return true;
}
public OnPlayerText(playerid, text[])
{
if(!ChatCmd_Enable && !DonoServer)
{
return false;
}
return true;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!ChatCmd_Enable && !DonoServer)
{
return false;
}
return true;
}
P.S.: Nгo testei e tem que alterar a variбvel DonoServer para a variбvel administrativa...
@edit
Se usa zcmd usa essa calback acima, se usa strcmp use a callback abaixo:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!ChatCmd_Enable && !DonoServer)
{
return false;
}
return true;
}