SA-MP Forums Archive
Server Unknown command - 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: Server Unknown command (/showthread.php?tid=417471)



Server Unknown command - lean1337 - 21.02.2013

Hello, im trying to change the Server:Unknown command but it doesnt work, I still get the message Server: Unknown command.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    return SendClientMessage(playerid,-1,"Error: Invalid command! Use /help to see all available commands!");
}
Im using sscanf2 and zcmd.


Re: Server Unknown command - Neil. - 21.02.2013

For ZCMD, use this:

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, -1,"Error: Invalid command! Use /help to see all available commands!");
    return 1;
}



Re: Server Unknown command - lean1337 - 21.02.2013

Works, thanks Ken97!


Re: Server Unknown command - JamesS - 21.02.2013

Yeah, always needs return 1;, if you don't, the script gave no response, script wise.