CMD:teleport(playerid, params[])
{
new TeleportLocation[50];
if (sscanf(params, "z", TeleportLocation)) SendClientMessage(playerid, CommandError, "Usage: /teleport [LocationID/Name]");
else
{
if(strcmp(TeleportLocation, "help",true) || strcmp(TeleportLocation, "00",true))
{
SendClientMessage(playerid, CommandError, ".:: Using /teleport ::.");
SendClientMessage(playerid, CommandSuccess, "To use the /teleport command you must have the Name/ID of the place you want to teleport to.");
SendClientMessage(playerid, CommandSuccess, "To obtain a list of destination names and id's type /teleport names.");
}
else if(strcmp(TeleportLocation, "names", true) || strcmp(TeleportLocation, "01", true))
{
SendClientMessage(playerid, CommandError, ".:: Destination names and ID's ::.");
SendClientMessage(playerid, CommandSuccess, "SF Airport (Planes) [Name: fly] [ID: 02]");
}
else if(strcmp(TeleportLocation, "fly", true) || strcmp(TeleportLocation, "02", true))
{
if(GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid),-1891.1072,-733.9356,347.8068);
} else SetPlayerPos(playerid, -1891.1072,-733.9356,347.8068);
}
}
return 1;
}
, I changed the 'true' to a 'false' and still ended up with the same outcome.
return 0; }
|
Originally Posted by yoan103
Код:
return 0; } |
CMD:teleport(playerid, params[])
{
 new teleportlocation[50];
 if(sscanf(params, "s", teleportlocation)) return SendClientMessage(playerid, COLOR, "Usage: /teleport [location]");
 else if(strcmp(teleportlocation, "help") == 0 || strcmp(teleportlocation, "00") == 0)
 {
  // error message
 }
 else if(strcmp(teleportlocation, "names") == 0)
 {
  // and so on
 } Â
 return 1;
}