SA-MP Forums Archive
How to make tp ? - 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: How to make tp ? (/showthread.php?tid=456766)



How to make tp ? - bustern - 07.08.2013

Hello, how to make when i say /ls to teleport me to ls and other tps.


Re: How to make tp ? - Xoomer - 07.08.2013

its easy to make


pawn Код:
new Float:GalsTeleport[6][7] =
{
{1971.9337,-2296.6978,13.5469,83.7772},
{1965.8896,-2320.8816,13.5469,83.7772},
{1955.5322,-2342.9412,13.5469,10.1432},
{1913.7225,-2335.3032,13.5469,261.7289},
{1915.0986,-2291.8071,13.5469,261.7289},
{1921.5833,-2273.5156,13.5469,261.7289}
};
CMD:ls(playerid,params[])
{
   
  new rand = random(sizeof(GalsTeleport));
  new cartype = GetPlayerVehicleID(playerid);
  new State = GetPlayerState(playerid);
  if(State!=PLAYER_STATE_DRIVER)
  {
  SetPlayerInterior(playerid,0);
  SetPlayerPos(playerid,GalsTeleport[rand][0],GalsTeleport[rand][1],GalsTeleport[rand][2]+0.40);
  SetPlayerFacingAngle(playerid,GalsTeleport[rand][3]);
  SetVehicleZAngle(cartype,GalsTeleport[rand][3]);
  GameTextForPlayer(playerid,"~y~Gals Airport!",5000,3);
  }
  else if(IsPlayerInVehicle(playerid,cartype)== 1)
  {
  SetVehiclePos(cartype,GalsTeleport[rand][0],GalsTeleport[rand][1],GalsTeleport[rand][2]+0.40);
  SetVehicleZAngle(cartype,GalsTeleport[rand][3]);
  SetPlayerInterior(playerid,0);
  GameTextForPlayer(playerid,"~y~Gals Airport!",5000,3);
  }
  else
  {
  SetPlayerInterior(playerid,0);
  SetPlayerPos(playerid,GalsTeleport[rand][0],GalsTeleport[rand][1],GalsTeleport[rand][2]+0.40);
  SetPlayerFacingAngle(playerid,GalsTeleport[rand][3]);
  }
  return 1;

}



Re: How to make tp ? - bustern - 07.08.2013

But where to put that ?