SA-MP Forums Archive
Advanced Tires System! - 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: Advanced Tires System! (/showthread.php?tid=522086)



Advanced Tires System! - Juvanii - 25.06.2014

Is it possible to check which vehicle's tire of 4 tires is in range of point of something?


Re: Advanced Tires System! - Jack_Leslie - 25.06.2014

It is possible.. but it would require a lot of mathematical equations, like getting the vehicle's position, and with each separate vehicle, finding out where the part of the car is according to the vehicle's position.


Re: Advanced Tires System! - Juvanii - 25.06.2014

Do you have any link that shows something similar to this?


Re: Advanced Tires System! - Jack_Leslie - 25.06.2014

Shit, I found exactly what you're looking for, a new feature that was added in 0.3e, I had no idea it existed.

https://sampwiki.blast.hk/wiki/GetVehicleModelInfo
https://sampwiki.blast.hk/wiki/Vehicle_information_types

Quote:

VEHICLE_MODEL_INFO_SIZE // Vehicle size
VEHICLE_MODEL_INFO_FRONTSEAT // Position of the front seat*
VEHICLE_MODEL_INFO_REARSEAT // Position of the rear seat*
VEHICLE_MODEL_INFO_PETROLCAP // Position of the fuel cap*
VEHICLE_MODEL_INFO_WHEELSFRONT // Position of the front wheels*
VEHICLE_MODEL_INFO_WHEELSREAR // Position of the rear wheels*
VEHICLE_MODEL_INFO_WHEELSMID // Position of the middle wheels (applies to vehicles with 3 axes)*
VEHICLE_MODEL_INFO_FRONT_BUMPER_Z // Height of the front bumper
VEHICLE_MODEL_INFO_REAR_BUMPER_Z // Height of the rear bumper




Re: Advanced Tires System! - Juvanii - 26.06.2014

I know this, but this doesn't check if 1 tires is in range of point of something :)


Re: Advanced Tires System! - Jack_Leslie - 26.06.2014

Quote:
Originally Posted by Juvanii
Посмотреть сообщение
I know this, but this doesn't check if 1 tires is in range of point of something
No, but this way you can get the position of the vehicles wheels of the vehicle model, then calculate the position of the vehicle wheels on a specific vehicle id according to the position of the wheels on the model. Not sure of the actual calculations so you'll have to cross your fingers and hope someone with mathematical skills comes along and helps lol

Edit:
Found this, it's amazing what ****** can find.

https://sampforum.blast.hk/showthread.php?tid=411705
Result: http://puu.sh/1UOPY


Re: Advanced Tires System! - Juvanii - 26.06.2014

i think making this system is so freakin hard, i hope sa-mp team make a feature to get a specific tire position in the future samp "sa-mp 0.4a"