"Unkown Command" Removal.
#1

How do I remove the damn stupid and annoying "Unknown Command"?.
I have even created a command and then etc. /testmessage, the message comes out. (Client Message) but beneath it, "Unknown Command". How? It will really help me.
Reply
#2

Post code.
Reply
#3

Incorrect answer :/ sorry
Reply
#4

@Vincent, I mean nothing wrong with the code. My whole server has this thing. I created a command, by me. Then anytime I type in the command it works. No problem but that thing appears saying "Unknown Command". Its not a problem but I'm just wondering whether I could remove it. See like other servers I have tried, I just type a non existent command. Etc./iamkiller , Nothing appears. Its just like no client message and no "Unknown Command", that's why I believe there is a way to remove it.

There is no OnPlayerCommandPerformed on the Wiki. :0 Never seen that code before, It should be added to the wiki.
Reply
#5

put a return 1; at the end of the cmd if it isnt there it will work but say unknown cmd when you use it
Reply
#6

There that's the problem. But is there no other way to remove the "Unknown Command" at all?
Reply
#7

what r u using
Код:
onplayercommand text
zcmd
ycmd
dcmd
post which ones
Reply
#8

yes there is place a
pawn Код:
}
    return 1;
}
at the end of the cmd
if the CMD doesnt return anything samp reads it as unknown
Reply
#9

Strcmp, OnPlayerCommandText.
Reply
#10

do this
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/testmessage", cmdtext, true) == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "my test cmd");
        return 1;
    }
    return 0;
}
if it finds /testmessage it will return the message and return 1 saying it is a known cmd if it isnt /testmessage it wont find it return 0 and tell you unknown cmd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)