SA-MP Forums Archive
Wrong 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: Wrong command (/showthread.php?tid=194785)



Wrong command - laci112 - 30.11.2010

hy somebody can help me?
O create a teleport command its work's fine but when i tipe the command in game i ben teleported to chilliad but i get this error message SERVER:Unknown command[but the commands work fine i got teleported] Sorry my bad english.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chilliad", true) == 0)
      if (IsPlayerInAnyVehicle(playerid))
        {
            SetVehiclePos(GetPlayerVehicleID(playerid),-2308.7029,-1658.0901,483.6802);
            SendClientMessage(playerid, 0xFFFF00AA, "Mount Chilliad");
            }
            else
            {
            SetPlayerPos(playerid,-2308.7029,-1658.0901,483.6802);
            SendClientMessage(playerid, 0xFFFF00AA, "Mount Chilliad");
            return 1;
        }
    return 0;
}
And how to replace the Server:Unknow command message for to This Command not exit's tipe /commands ?


Re: Wrong command - Ash. - 30.11.2010

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/chilliad", true) == 0)
    {
         if (IsPlayerInAnyVehicle(playerid))
         {
            SetVehiclePos(GetPlayerVehicleID(playerid),-2308.7029,-1658.0901,483.6802);
            SendClientMessage(playerid, 0xFFFF00AA, "Mount Chilliad");
         }
         else
         {
            SetPlayerPos(playerid,-2308.7029,-1658.0901,483.6802);
            SendClientMessage(playerid, 0xFFFF00AA, "Mount Chilliad");
        }
         return 1;
     }
    return SendClientMessage(playerid, 0xFFFF00AA, "The command does not exist. Type /commands");
}



Re: Wrong command - laci112 - 30.11.2010

Thanks a loot