05.01.2014, 11:20
OnPlayerCrashVehicle
Introduction
This include simply detects if a player crashes their vehicle. This is done by comparing the vehicle's last health and speed, and checking if both of them dropped abruptly.
How does it work?
As explained above, the system checks if the vehicle's health or speed dropped unexpectedly. I've tested this extensively and it seems to work great. The callback is not fired when a player shoots at the vehicle.
Installation
Simply download the include and place it inside your include folder.
Now you can use the callback correspondingly:
And you're done!
There are also some definitions at the top of the include. Feel free to adjust them accordingly, but be sure you know what you're doing first!
Damage status updating
I am aware that there is a callback for this already, however that specific callback is fired when a vehicle's damage status is updated. It is also called when a player shoots at a vehicle, so it really isn't reliable to use for this purpose.
Download
Solidfiles
Pastebin
Introduction
This include simply detects if a player crashes their vehicle. This is done by comparing the vehicle's last health and speed, and checking if both of them dropped abruptly.
How does it work?
As explained above, the system checks if the vehicle's health or speed dropped unexpectedly. I've tested this extensively and it seems to work great. The callback is not fired when a player shoots at the vehicle.
Installation
Simply download the include and place it inside your include folder.
pawn Код:
#include <a_samp>
#include <OPVA>
pawn Код:
public OnPlayerCrashVehicle(playerid, vehicleid)
{
return 1;
}
There are also some definitions at the top of the include. Feel free to adjust them accordingly, but be sure you know what you're doing first!
Damage status updating
I am aware that there is a callback for this already, however that specific callback is fired when a vehicle's damage status is updated. It is also called when a player shoots at a vehicle, so it really isn't reliable to use for this purpose.
Download
Solidfiles
Pastebin