Unknown command but still process
#1

Hello there, I have some issues with this...

if(strcmp(tmp, "hangup", true) == 0)
{
if(!IsPlayerConnected(id)) return 1;
if(PlayerInfo[playerid][pMobStats] == 0) return SCM(playerid, 0xFF8787FF, "ERROR: Your phone turned off or you didn't have it.");
if(TelefonRazgovor[playerid] != -1)
{
TelefonZvoni[playerid] = false, TelefonZvoni[TelefonRazgovor[playerid]] = false,
SCM(TelefonRazgovor[playerid],COLOR_YELLOW,"Call ended.");
SetPlayerSpecialAction(TelefonRazgovor[playerid], SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(TelefonRazgovor[playerid], TELEFON_SLOT), SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
RemovePlayerAttachedObject(playerid, TELEFON_SLOT); //KillTimer(MobilniCenaRazgovora[playerid]), KillTimer(MobilniCenaRazgovora[TelefonRazgovor[playerid]]);
TelefonRazgovor[TelefonRazgovor[playerid]] = -1, TelefonRazgovor[playerid] = -1;
SCM(playerid,COLOR_YELLOW,"Call ended.");
KillTimer(Zvonjava[playerid]), KillTimer(Zvonjava[TelefonRazgovor[playerid]]);
KillTimer(Cijena[playerid]), KillTimer(Cijena[TelefonRazgovor[playerid]]);
return 1;
}
else return SCM(playerid,0xFF8787FF,"ERROR: Your phone is not ringing, try again later if it rings.");
}

So, command process but says Unknown command, but when I'm not on call and "Your phone is not ringing, try again later if it rings" it works great, process and doesn't says "Unknown command"
Reply
#2

Do you have strcmp and zcmd commands in your script? You can only have one or you need to disable the "Unknown Command" message completely by returning 0 at the end of OnPlayerCommandText
Reply
#3

No, I have zcmd, and this what I do is sub-commands or however you want to call it, m is general command and if you type /m call it will be sub-command
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)