Need help
#1

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 >
Reply
#2

AttachObjectToVehicle
Reply
#3

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.
Reply
#4

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.
Reply
#5

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 */
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)