Unknown command - Problem
#1


Hi guys.

I'm building a GameMode, After i built the command /stats [Code in the buttom],
And typed it in the game, I get the "SERVER: Unknown command" error.

This is the Command:
pawn Код:
if(strcmp(cmd, "/stats", true) == 0)
    {
        new Title[128], Line1[128];
        new KillsP = PlayerInfo[playerid][Kills];
        new DeathsP = PlayerInfo[playerid][Deaths];
        format(Title, sizeof(Title), "{FF9900}--------------- Stats({33CCCC}%s{FF9900}) ---------------", GetName(playerid));
        format(Line1, sizeof(Line1), "{F0F8FF}Kills: %i {FFFFFF}| {F0F8FF}Deaths: %i {FFFFFF}| {F0F8FF}Kills/Death Ratio: %i {FFFFFF}| {F0F8FF}Skin: %i", KillsP, DeathsP, KillsP/DeathsP, PlayerInfo[playerid][Skin]);
        SendClientMessage(playerid, White, Title);
        SendClientMessage(playerid, White, Line1);
        return 1;
    }
I dont have any Compile error/warning, and all my other commands working properly.

Please help, InferNus`
Reply
#2

Make sure you add it before the return 0; in the OnPlayerCommandText callback.
Reply
#3

No, It is before the return o; of OnPlayerCommandText
Reply
#4

Try zmcd or ycmd
Reply
#5

Thank you for the Offer but i think using strtok is the simple old way...
Reply
#6

Please help me. It's kind of important.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)