How detect offsets of vehicle - 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: How detect offsets of vehicle (
/showthread.php?tid=535408)
How detect offsets of vehicle -
Hantex. - 03.09.2014
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)
Re: How detect offsets of vehicle -
Sawalha - 03.09.2014
This would be used with :
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
I think the offsets are
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.
Re: How detect offsets of vehicle -
Gogeta101 - 03.09.2014
Check if you are in range with that vehicle then use attach that object to vehicle.
Re: How detect offsets of vehicle -
Hantex. - 03.09.2014
Quote:
Originally Posted by Sawalha
This would be used with :
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
I think the offsets are
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.
Re: How detect offsets of vehicle -
Sawalha - 03.09.2014
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
Re: How detect offsets of vehicle -
Hantex. - 03.09.2014
Quote:
Originally Posted by Sawalha
|
I think there will be a method to automatically derive the offset of each vehicle.
Re: How detect offsets of vehicle -
Gogeta101 - 03.09.2014
GetVehicleModel
Re: How detect offsets of vehicle -
Rifa4life - 03.09.2014
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
Re: How detect offsets of vehicle -
Hantex. - 04.09.2014
BUMP!
Re: How detect offsets of vehicle -
Jack_Leslie - 04.09.2014
Quote:
Originally Posted by Hantex.
BUMP!
|
Look at the post above.