Wrong command
#1

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 ?
Reply
#2

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");
}
Reply
#3

Thanks a loot
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)