Server Unknown command
#1

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.
Reply
#2

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;
}
Reply
#3

Works, thanks Ken97!
Reply
#4

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


Forum Jump:


Users browsing this thread: 2 Guest(s)