Em OnPlayerCommandText no final dela tem um return false coloque return SendClientMessage(playerid, -1, "Nao existe");
|
public OnPlayerCommandText(playerid, cmdtext[]) { if (zcmd_g_HasOPCS && !CallLocalFunction("OnPlayerCommandReceived", "is", playerid, cmdtext)) { return 1; } new pos, funcname[MAX_FUNC_NAME]; while (cmdtext[++pos] > ' ') { funcname[pos-1] = tolower(cmdtext[pos]); } format(funcname, sizeof(funcname), "cmd_%s", funcname); while (cmdtext[pos] == ' ') pos++; if (!cmdtext[pos]) { if (zcmd_g_HasOPCE) { return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, "\1")); } return CallLocalFunction(funcname, "is", playerid, "\1"); } if (zcmd_g_HasOPCE) { return CallLocalFunction("OnPlayerCommandPerformed", "isi", playerid, cmdtext, CallLocalFunction(funcname, "is", playerid, cmdtext[pos])); } return CallLocalFunction(funcname, "is", playerid, cmdtext[pos]); }
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, -1, "sua mensagem de erro");
return 0x01;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, -1, "sua mensagem de erro");
static cmdLog[100], name[24];
foreach(Player, ii)
{
if(!IsPlayerAdmin(ii)) continue;
GetPlayerName(playerid, name, 24);
format(cmdLog, sizeof cmdLog, "[CMD]%s: %s", name, cmdtext);
SendClientMessage(ii, -1, cmdLog);
//print(cmdLog);
}
return 0x01;
}