SA-MP Forums Archive
Unknown Command Problem - Any Help Please? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknown Command Problem - Any Help Please? (/showthread.php?tid=295380)



Unknown Command Problem - Any Help Please? - 15outland - 06.11.2011

Hi,

I wasn't quite sure where to post this but I have a problem regarding the commands on my server..

for example, If i do /hitlist - It will display all ther current hits on people, but then underneath that, It says "Invalid Command! Use /cmds to see the general commands."); or "Unknown Command"

This is the return line after the commands..

"return SendClientMessage(playerid, WHITE, "Invalid Command! Use /cmds to see the general commands.");"


************************************************** ************************************
I.E

pawn Код:
if(!strcmp(cmdtext,"/pc",true))
        {
        HideDraw(playerid);
        TextDrawShowForPlayer(playerid,text41);
        TextDrawShowForPlayer(playerid,text42);
        TextDrawShowForPlayer(playerid,PCBOX);
        TextDrawShowForPlayer(playerid,text43);
        return 1;
        }
        if(!strcmp(cmdtext,"/rules",true))
        {
        SendClientMessage(playerid, 0x00C2ECFF, "Rule 1: Do Not Hack, Cheat Or Bug Abuse Or You Will Get Kicked/Banned.");
        SendClientMessage(playerid, 0x00C2ECFF, "Rule 2: Do Not Deathmatch Other Players. Cops can only kill reds and oranges.");
        SendClientMessage(playerid, 0x00C2ECFF, "Rule 3: Do Not Insult Admins. Respect other players.");
        SendClientMessage(playerid, 0x00C2ECFF, "Rule 4: Do Not Ask To Be An Admin. We will ask you.");
        SendClientMessage(playerid, 0x00C2ECFF, "Rule 5: Do Not Bitch/Complain About The Server.");
        SendClientMessage(playerid, 0x00C2ECFF, " ");
        return 1;
        }
      return SendClientMessage(playerid, WHITE, "Invalid Command! Use /cmds to see the general commands.");
pawn Код:
if(!strcmp(cmdtext, "/hitlist", true))
    {
        new count = 0;
        SendClientMessage(playerid, COLOR_MSG, "Listing Currently Placed Hits:");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && hit[i] > 0)
            {
                new string[256];
                format(string, 256, "Hit On %s (%i) For $%i", ReturnPlayerName(i), i, hit[i]);
                SendClientMessage(playerid, COLOR_FOUND, string);
                count++;
            }
        }
        if(count == 0)
        {
            SendClientMessage(playerid, COLOR_ERROR, "No Hits Have Been Placed At This Time!");
        }
 }
I have only one at the end, but even if I remove that, or try to change, It will just say "UNKNOWN COMMAND"

I have no clue on how to stop it from popping up..

If anyone can help me out here, be a big help - I do apologize If It doesn't make all much sense XD

************************************************** *******************************

So to try to make it more clear.

The commands do work, but after each one it still says the error below it, Invalid Command or Unknown Command.


Re: Unknown Command Problem - Any Help Please? - GAMER_PS2 - 06.11.2011

use [ pawn ] [/ pawn ] please we cant read the command if its not on [ pawn ] [/ pawn ]


Re: Unknown Command Problem - Any Help Please? - 15outland - 06.11.2011

@Infamous

It didn't really do anything, I don't have a problem w/ /pc, its mainly the /hitlist is when it happens


Re: Unknown Command Problem - Any Help Please? - Infamous - 06.11.2011

return 1; on /hitlist.


Re: Unknown Command Problem - Any Help Please? - 15outland - 07.11.2011

Tyvm