Las Venturas Playground
Vehicle crashing - Health loss - Printable Version

+- Las Venturas Playground (https://forum.sa-mp.nl)
+-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html)
+--- Forum: Development (https://forum.sa-mp.nl/forum-16.html)
+--- Thread: Vehicle crashing - Health loss (/thread-11844.html)



Vehicle crashing - Health loss - Jay - 08-29-2008

After recently completing my speedometer ticket, I just wrote out a ticket for the vehicle crashes health loss system. However, I have come to realize before assigning it to myself that it may not be the best idea.

The original idea (discussed here) was said that it should be detected by vehicle health decreases. However, what if a deathmatcher starts shooting the car? How can we tell the difference between a health decrease in a crash and somebody shooting it?




Re: Vehicle crashing - Health loss - Badeend - 08-30-2008

That's simple. Just check if a another player is 0 to 100 meters from the car, calculate his angle and compare it with the car's position and check if the player's ammo decreases. If this is not the case, the car has just crashed >:) :P

Anyway, that's pretty difficult to check indeed.


Re: Vehicle crashing - Health loss - Jay - 08-30-2008

That wouldn't bee 100% fall proof tbh. Somebody could be driving towards two players in the middle of a fight constantly shooting and switching angles to avoid the bullets and then crash into them, well, run them over.

Another idea I just had is using the speedometers functions, maybe we could check for sudden speed decreases as-well as health decreases. That might not always work either though since it's not 100% accurate.


Re: Vehicle crashing - Health loss - tomozj - 09-02-2008

(08-30-2008, 12:16 AM)Badeend link Wrote: That's simple. Just check if a another player is 0 to 100 meters from the car, calculate his angle and compare it with the car's position and check if the player's ammo decreases. If this is not the case, the car has just crashed >:) :P

That must be a joke. :+

I'm not entirely sure. I guess some flying bullets hitting a car could hit the driver, so if you damage the car 10 units, the driver loses 1 unit of health? Meaning if you rape a car into a flames the driver will die, meh.

This wouldn't be that smooth in my opinion.


Re: Vehicle crashing - Health loss - ooshie - 09-05-2008

You can't just check if the vehicle has come into contact with another object? Then check the loss of speed and calculate the ammount of health the player should lose?


Re: Vehicle crashing - Health loss - Jay - 09-05-2008

Nope, not possible in SA:MP. There's no functions to detect any collisions of any kind.


Re: Vehicle crashing - Health loss - ooshie - 09-10-2008

Well then this will just have to wait for 3.0  ;)


Re: Vehicle crashing - Health loss - [Griffin] - 09-11-2008

if there is a 3.0 =/


Re: Vehicle crashing - Health loss - tomozj - 09-11-2008

Unless we use the new speedometer system to calculate the difference in speed when a vehicle's health changes. The more it is and the more vehicle health is lost, the more health the player loses?


Re: Vehicle crashing - Health loss - Jay - 10-23-2008

Right, thought about it. We'll just work out the highest amount of vehicle health that can be decreased using a weapon (Discluding rocket launchers and stuff because they instantly explode the car and kill any players inside it anyway) and only detect vehicle crashes if the health decrease is more than what that weapon caused, which is more realistic anyway, since in real life you don't hurt yourself from little car crashes anyway, only big ones.