[Help] Unknown command
#1

I solved all errors and warnings, but, when I use any command, It pulling Server: Unknown command. Any help ?
And sorry for bad English
Reply
#2

do you have any filterscript running?
if so, check it for the "OnPlayerCommand" callback and the "return" at the end (set it to 0)
Reply
#3

Quote:
Originally Posted by Sascha
Посмотреть сообщение
do you have any filterscript running?
if so, check it for the "OnPlayerCommand" callback and the "return" at the end (set it to 0)
I don't have any FilterScript.
Reply
#4

check your script mybe some of your script using ZCMD + strcmp
ZCMD + strcmp = not works
Reply
#5

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
check your script mybe some of your script using ZCMD + strcmp
ZCMD + strcmp = not works
I using YCMD
Reply
#6

Show your onplayercommandText and any one command.
Reply
#7

Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
Show your onplayercommandText and any one command.
All commands are outside of CallBack.
Here is OnPlayerCommandText:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 1;
}
And here is, for example, /report command:
pawn Код:
YCMD:report(playerid, params[], help)
{
        #pragma unused help
        new string[128], text[48];
        if(sscanf(params, "s[48]", text)) return SCM(playerid, COLOR_RED, "Koriљtenje: /report [Text]");
        foreach(Player, i) {
        if(P_Data[i][pAdmin] > 0) {
        format(string,sizeof(string),""COL_BLUE"[REPORT] Igrač %s: "COL_WHITE"%s ",GetName(playerid),text);
        SCM(i,-1,string);
        AskLog(playerid,text);} }
        return 1;
}
Reply
#8

Wich commands doesn't work? do you have a problem with all commands or just a few? if the problem are few commands port them here.
Reply
#9

Quote:
Originally Posted by HarlemSAMP
Посмотреть сообщение
Wich commands doesn't work? do you have a problem with all commands or just a few? if the problem are few commands port them here.
All commands.
Reply
#10

this is how I have it
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    return 1;//use ths to make the script think that your command worked even if you don't have any commands
}
//then use this to set whatever message you want to send if they whrite wrong message
public OnPlayerCommandPerformed(playerid, cmdtext[], success){
    if(success == 0) return SendClientMessage(playerid, COLOR_GRAY2, "SERVER: Unknown command, use /help for further help.");//this is my command, but feel free to edit it as you want :)
}
Hope that helped you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)