/teleport with car - 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: /teleport with car (
/showthread.php?tid=87915)
/teleport with car -
matdav - 23.07.2009
Hi everyone i was wondering how to make a teleport command that tele u and the car u are in because
SetPlayerPos(...) just tele u and not the car
cuz i need a command /return to get off from my army base maked far in water
thx for help
Re: /teleport with car -
Joe Staff - 23.07.2009
To teleport the vehicle that a player is in, you have to teleport the vehicle's position, and the player will go with it. The function you're looking for is "SetVehiclePos", to determine what vehicle the player is in use "GetPlayerVehicleID". A conditional to determine wether or not the player is in a vehicle in the first place is necessary.
Re: /teleport with car -
matdav - 23.07.2009
thx i will see if i need help and i will reply back if i need
EDIT;
well if u can make me an example it will be great cuz idk how to use GetPlayerVehicleID
is it GetPlayerVehicleID(playerid) ?
and SetVehiclePos is same as
SetPlayerPos ?