[help] teleporting - 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: [help] teleporting (
/showthread.php?tid=92264)
[help] teleporting -
sggassasin - 19.08.2009
i was woundering how i can teleport with my car still with me
thx for ur time
Re: [help] teleporting -
bogeymanEST - 19.08.2009
When you are in a vehicle and you teleport the vehicle, you remain inside the vehicle...
pawn Код:
SetVehiclePos(vehicleid, X, Y, Z);
Re: [help] teleporting -
Goobiiify - 19.08.2009
pawn Код:
if (strcmp("/teleport",cmdtext,true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(vehicleid,X, Y,Z);
}
else {
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
Not tested but it would work, kewl
Re: [help] teleporting -
CAR - 19.08.2009
Nearly good!
But if you are in a car the car only teleport.
Here:
Код:
if (strcmp("/teleport",cmdtext,true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(vehicleid,X, Y,Z);
SetPlayerPos(playerid,X,Y,Z);
}
else
{
SetPlayerPos(playerid,X,Y,Z);
}
return 1;
}
}