SA-MP Forums Archive
Unknown Commands! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknown Commands! (/showthread.php?tid=542299)



(Fixed) - Crazydriver - 18.10.2014

Hey guys whenever i do /rob, /rape it says Unknown commands no error in scripts every plugins loaded !!


Re: Unknown Commands! - Rudy_ - 18.10.2014

Are you using Zcmd? if yes, It has to be on the bottom, and remove your OnPlayerCommandText function. Else if it is strcmp
it should be like this (for multiple cmds)
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/help", true))
    {
        SendClientMessage(playerid, -1, "SERVER: This is the /help command!");
        return 1;
    }
    if(!strcmp(cmdtext, "/help123", true))
    {
        SendClientMessage(playerid, -1, "SERVER: This is the /help123 command!");
        return 1;
    }
    return 0;
}



Re: Unknown Commands! - mirza1221 - 18.10.2014

U must put return 1; at the end of CMD


Re: Unknown Commands! - Gogeta - 18.10.2014

Change return 0 to 1


Re: Unknown Commands! - AroseKhanNiazi - 18.10.2014

that can be problem or the command crashes use print function after each line and see is command fully executed..