SA-MP Forums Archive
Get position of vehicle's tires - 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: Get position of vehicle's tires (/showthread.php?tid=566797)



Get position of vehicle's tires - Kwashiorkor - 08.03.2015

I wanted to make a vehicle's tires pop if they have been shot. I'm using OnPlayerWeaponShot and the information of GetVehiclePos and GetVehicleModelInfo but I'm quite frustrated about the maths. Can anyone here help me?


Re: Get position of vehicle's tires - SKAzini - 08.03.2015

But don't they already do that in the default GTA/SA:MP?


AW: Get position of vehicle's tires - Kwashiorkor - 08.03.2015

If someone is in the vehicle, yes. But not if there's no driver and no passengers


Re: Get position of vehicle's tires - Pillhead2007 - 08.03.2015

Not at home at the min but basically you have to have bullet hit vehicle under player shot weapon then the function isvehicleoccupied(vehicleid) = 0 then create a stock with getvehiiclemodelinfo using rear and drone -0.5 +0.5 on both then stock setvehicletire pop with new panels doors tires then set which tire to Pop I written the code but added check points to which tire is popped so you get tire out the boot d fix tire lol I'm at work at the min See of that puts you on right direction


AW: Get position of vehicle's tires - Kwashiorkor - 08.03.2015

I'm aware of what I have to do, yet the maths is hard. How to use the vehicle's rotation and such? http://en.wikipedia.org/wiki/Quatern...atial_rotation I haven't worked with them so I really don't know what to do, sorry.


Re: Get position of vehicle's tires - Misiur - 08.03.2015

https://sampforum.blast.hk/showthread.php?tid=446462 and https://sampforum.blast.hk/showthread.php?tid=455269 can help you with those.


AW: Get position of vehicle's tires - Kwashiorkor - 08.03.2015

That is exactly what I needed. Many thanks Misiur