Change SERVER: Unknown command +REP
#1

How do I change the line where it says "SERVER: Unknown command" whenever I type in an unknown command?
Reply
#2

At the end of OnPlayerCommandText you'll find "return 0;"
Change 0 to a costume line.

e.g.
Код:
return SendClientMessage(playerid,COLOR,"This command doesn't exist");
Reply
#3

Quote:
Originally Posted by Manuel_P
Посмотреть сообщение
At the end of OnPlayerCommandText you'll find "return 0;"
Change 0 to a costume line.

e.g.
Код:
return SendClientMessage(playerid,COLOR,"This command doesn't exist");
I'm using ZCMD so I don't think there is a SendClientMessage.
Reply
#4

Anyone please?
Reply
#5

Just do what Manuel said, its that simple. Change the color to the color of your liking.

Or do what the person below wrote -_- (I think that is a function that comes with YCMD, if not correct)
Reply
#6

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR, "MESSAGE");
    return 1;
}
Reply
#7

TOP:

Quote:

//Changing SERVER:Unknown Command
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);

pawn Код:
//Unknown Callback
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: You entered a invalid command. Type /Help for a list of the main commands!");
    return 1;
}
This work for sure, Im using this too...
Reply
#8

Works! +REP! Thanks so much!
Reply
#9

Quote:
Originally Posted by Gooday
Посмотреть сообщение
TOP:



pawn Код:
//Unknown Callback
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "SERVER: You entered a invalid command. Type /Help for a list of the main commands!");
    return 1;
}
This work for sure, Im using this too...
i said that :c
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)