SA-MP Forums Archive
Whats wrong with Command - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Whats wrong with Command (/showthread.php?tid=68101)



Whats wrong with Command - CarbonCry - 07.03.2009

Hi when i use that Command always comes "Unknown Command".. whats wrong ?


if(strcmp(cmd, "/buyskin", true) == 0)
{
if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.257 || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "BENUTZUNG: /buyskin [skinid]");
return 1;
}
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "BENUTZUNG: /buyskin [skinid]");
return 1;
}
new skin = strval(tmp);
if(!IsValidSkin(skin)) return SendClientMessage(playerid, COLOR_RED, "Skins sind nicht verfьgbar!");
SetPlayerSkin(playerid, skin);
OnPlayerUpdateIG(playerid);
SendClientMessage(playerid, COLOR_RED, "Skin changed!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "Spieler wurde nicht gefunden!");
}
}
return 1;
}


Re: Whats wrong with Command - Snyper18 - 07.03.2009

Howmany commands do you have in your script?


Re: Whats wrong with Command - CarbonCry - 07.03.2009

160-190


Re: Whats wrong with Command - Snyper18 - 07.03.2009

When you have alot of commands, It starts to say that


Re: Whats wrong with Command - CarbonCry - 07.03.2009

Anyway to fix ?


Re: Whats wrong with Command - Snyper18 - 07.03.2009

Not that i know of.
Sorry dood


Re: Whats wrong with Command - CarbonCry - 07.03.2009

okay deleted some commands .. it works.. but there always come that

tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "BENUTZUNG: /buyskin [skinid]");
return 1;
}

whats wrong


Re: Whats wrong with Command - harly - 07.03.2009

Well i have 2 commands and it fucks up !


Re: Whats wrong with Command - CarbonCry - 07.03.2009

pawn Код:
tmp = strtok(cmdtext, idx);
       if(!strlen(tmp))
       {
         SendClientMessage(playerid, COLOR_RED, "BENUTZUNG: /buyskin [skinid]");
         return 1;
       }
uhhmm command problem is fixxed.. always that message comes and i get not my skin


Re: Whats wrong with Command - CarbonCry - 14.03.2009

uhhmm command problem is fixxed.. always that message comes and i do not get my skin i choosed, just cj skin
pawn Код:
if(strcmp(cmd, "/buyskin", true) == 0)
        {
          if(PlayerToPoint(25.0,playerid,207.5627,-103.7291,1005.2578) || PlayerToPoint(25.0,playerid,203.9068,-41.0728,1001.8047))
          {
                new skin = strval(tmp);
                if(!IsValidSkin(skin)) return SendClientMessage(playerid, COLOR_RED, "Skins not available!");
                SetPlayerSkin(playerid, skin);
                OnPlayerUpdateIG(playerid);
                SendClientMessage(playerid, COLOR_RED, "Skin changed!");
            }
            else
            {
                  SendClientMessage(playerid, COLOR_RED, "U r not in a Binco!");
            }
          return 1;
        }