SA-MP Forums Archive
Unknown command - Problem - 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 (/showthread.php?tid=317052)



Unknown command - Problem - InferNus` - 09.02.2012


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`



Re: Unknown command - Problem - =WoR=G4M3Ov3r - 09.02.2012

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


Re: Unknown command - Problem - InferNus` - 09.02.2012

No, It is before the return o; of OnPlayerCommandText


Re: Unknown command - Problem - smokeweed - 09.02.2012

Try zmcd or ycmd


Re: Unknown command - Problem - InferNus` - 09.02.2012

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


Re: Unknown command - Problem - InferNus` - 10.02.2012

Please help me. It's kind of important.