SA-MP Forums Archive
Transporting Vehicle and its trailer to an Interior and keeping it attached - 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: Transporting Vehicle and its trailer to an Interior and keeping it attached (/showthread.php?tid=133294)



Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 11.03.2010

I would like to know how to do the above title.

This is what i have so far:

Code:
if(pickupid == stadium) {
    if(IsPlayerInAnyVehicle(playerid)){
      new currentveh = GetPlayerVehicleID(playerid);
      new trailercheck = GetVehicleTrailer(currentveh);
      SetPlayerInterior(playerid, 7);
      LinkVehicleToInterior(currentveh, 7);
      LinkVehicleToInterior(trailercheck, 7);
      SetVehiclePos(currentveh, -1405.1145,-258.0632,1044.6563);
      SetVehiclePos(trailercheck, -1399.1112,-239.9723,1044.6563);
      SetVehicleZAngle(currentveh, 341.5829);
      SetVehicleZAngle(trailercheck, 341.5829);
      AttachTrailerToVehicle(trailercheck, currentveh);
    }
}
this is under OnPlayerPickupPickup

It works for vehicles and it even sets the trailers interior but it does not move it.

do i need to place things in a different order?


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 12.03.2010

bump


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 12.03.2010

bump (note the times so don't moan about the bumps)

I have now tried Setting the Trailers Position first and still no luck


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 14.03.2010

bump again


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 14.03.2010

im 17 minutes short of 12 hours but its better than just 17 minutes

bump


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 15.03.2010

i cant believe no one has a comment

bump again

i really want to get this sorted.


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - mick88 - 16.03.2010

Lemme reply:
AttachTrailerToVehicle(trailerid, vehicleid);


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - adsy - 16.03.2010

Quote:
Originally Posted by mick88
Lemme reply:
AttachTrailerToVehicle(trailerid, vehicleid);
please re read the first post


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - ¤Adas¤ - 16.03.2010

This have to work... What is the problem?


Re: Transporting Vehicle and its trailer to an Interior and keeping it attached - itspartytiem - 16.03.2010

What do you mean by "it doesn't move it"?