Need help - 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: Need help (
/showthread.php?tid=313090)
Need help -
sayhello - 24.01.2012
I want to attach machine gun into the vehicle, I've tried to ****** it but not found any tutorial. If there's any please share it here. thanks in advance >
Re: Need help -
vassilis - 24.01.2012
AttachObjectToVehicle
Re: Need help -
sayhello - 24.01.2012
Yeah I know, for example I'm using Landstalker (vehicle) and want to attach in the front on the left/right side. how to find set directions? Simply want to know how to set this?
Float:OffsetX The distance between the vehicle and the object in the X direction.
Float:OffsetY The distance between the vehicle and the object in the Y direction.
Float:OffsetZ The distance between the vehicle and the object in the Z direction.
Float:RotX The X rotation between the object and the vehicle.
Float:RotY The Y rotation between the object and the vehicle.
Float:RotZ The Z rotation between the object and the vehicle.
Re: Need help -
sayhello - 24.01.2012
Which software do you use to see vehicle
Float:OffsetX The distance between the vehicle and the object in the X direction.
Float:OffsetY The distance between the vehicle and the object in the Y direction.
Float:OffsetZ The distance between the vehicle and the object in the Z direction.
Float:RotX The X rotation between the object and the vehicle.
Float:RotY The Y rotation between the object and the vehicle.
Float:RotZ The Z rotation between the object and the vehicle.
Re: Need help -
[KHK]Khalid - 24.01.2012
to get a vehicle position use GetVehiclePos(). read this page
https://sampwiki.blast.hk/wiki/Function:GetVehiclePos
Edit:
pawn Код:
// top of your script
new obj;
new veh;
// on OnGameModeInit
veh = CreateVehicle(bla bla bla); // this is the vehicle which you want to link the object to
obj = CreateObject(bla bla bla); // this is the object which you want to attach to the "veh"
// now attaching obj >to> veh
AttachObjectToVehicle(obj, veh, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0); // just an example
/* NOTE: change the "bla bla bla" to the object/vehicle coords */