Teleport with trailer? - 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 trailer? (
/showthread.php?tid=122527)
Teleport with trailer? -
AiVAMAN - 22.01.2010
Is it possible to make Truck teleport with trailer?
Re: Teleport with trailer? -
Fedee! - 22.01.2010
I think that no, cause trailer is like "another car", has ID.
Re: Teleport with trailer? -
AiVAMAN - 22.01.2010
Aww.
Re: Teleport with trailer? -
mick88 - 23.01.2010
Did u try to AttachTrailer after teleporting? Dont remember function name. U can also try to teleport trailer by the same coords and attach it. Should work
Re: Teleport with trailer? -
¤Adas¤ - 23.01.2010
Use function GetVehicleTrailer...
Re: Teleport with trailer? -
AiVAMAN - 23.01.2010
I made this:
pawn Код:
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
{
new Trailer = GetVehicleTrailer(GetPlayerVehicleID(playerid));
SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
AttachTrailerToVehicle(Trailer, GetPlayerVehicleID(playerid));
}
}
But haven't tested it yet. what do you think, will this work?