Get position of vehicle's tires
#1

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

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

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

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

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

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

That is exactly what I needed. Many thanks Misiur
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)