Removing "SERVER:(text)"
#1

Hey everyone !!!

So I saw that on onther servers , when you type a unknown command
this shows up : "SERVER: Unknown Command". My question is , how can
you change it so will show up like this "this command is unknown (blabla)"
Example : "[LOL] This command is unknown , please use /wtf for help"

Thank you,

-jNkk
Reply
#2

When "OnPlayerCommandText" ends in your script it will have something like this:

pawn Код:
return 1;
}
return 0;
}
Above the "return 0;" and before the closing bracket, put a "SendClientMessage".
Reply
#3

It works , but it it shows like this :

"SERVER: Command does not exist. Please use /help"
"SERVER: Unknown Command"

How can I make that second line dissapear

-jNkk
Reply
#4

Well you shouldn't remove the "return 0;" AFAIK, as it needs to be there to prevent some kind of cross-script conflict. But if you must, replace "return 0;" with the client message instead.
Reply
#5

Here is my script :
Please edit it because I still I don't get it :

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/test", cmdtext, true, 10) == 0)
    {
        Kick(playerid);
        return 1;
    }
    SendClientMessage(playerid,0x2F97FFFF,"SERVER: Comanda nu exista. Foloseste /ajutor !");
    return 0;
}
Reply
#6

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/test", cmdtext, true, 5) == 0)
    {
        Kick(playerid);
        return 1;
    }
    return SendClientMessage(playerid,0x2F97FFFF,"SERVER: Comanda nu exista. Foloseste /ajutor!");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)