How detect offsets of vehicle
#1

How can I detect the offset of a position of a vehicle like this video https://www.youtube.com/watch?v=vTum_5Y27A0?

(I'm trying to place a box behind a vehicle that each vehicle has a storage capacity of boxes)
Reply
#2

This would be used with :
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

I think the offsets are
Код:
 0.0, -1.0, 1.0
0.0 is for the X offset
- 1.0 is for the Y offset (getting the box back more)
1.0 for the Z offset (increasing it with 1.0 value so it will get up abit)

Not tested, but i'm sure they will work.
Reply
#3

Check if you are in range with that vehicle then use attach that object to vehicle.
Reply
#4

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
This would be used with :
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle

I think the offsets are
Код:
 0.0, -1.0, 1.0
0.0 is for the X offset
- 1.0 is for the Y offset (getting the box back more)
1.0 for the Z offset (increasing it with 1.0 value so it will get up abit)

Not tested, but i'm sure they will work.
I know but I need to detect the offset for each type of vehicle model.
Reply
#5

Hmm, that will need to check every vehicle model and imagine it's offsets (Depends on it's cover's size)
Here's a list of like that vehicles: https://sampwiki.blast.hk/wiki/Vehicles:Industrial
Reply
#6

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
Hmm, that will need to check every vehicle model and imagine it's offsets (Depends on it's cover's size)
Here's a list of like that vehicles: https://sampwiki.blast.hk/wiki/Vehicles:Industrial
I think there will be a method to automatically derive the offset of each vehicle.
Reply
#7

GetVehicleModel
Reply
#8

I'm sure that you could make use of:
pawn Код:
GetVehicleModelInfo(vehiclemodel, infotype, Float:X, Float:Y, Float:Z)
You can read about it here: https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
Reply
#9

BUMP!
Reply
#10

Quote:
Originally Posted by Hantex.
Посмотреть сообщение
BUMP!
Look at the post above.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)