10.09.2011, 18:56
I also support it being a gtaa bug, I have this little code to reduce vehicle damage on hit. it's pretty similiar to the same bug, if you hit the vehicle HARD sometimes, even if the health is like 800, it goes to 65535, then the vehicle has unlimited health on your screen, but other players say the vehicle is just there exploding..
pawn Код:
public OnVehicleHitUnoccupiedVehicle(playerid, myvehicleid, vehicleid)
{
new Float:Health, Float:size_x, Float:size_y, Float:size_z;
GetVehicleHealth(vehicleid, Health);
GetVehicleSize(myvehicleid, size_x, size_y, size_z);
size_z += size_x;
size_z += size_y;
new Float:total = GetVehicleSpeed(myvehicleid, true) * (size_z - 5.0) / (size_z - 2.0) ;
SetVehicleHealth(vehicleid, (floatsub(Health, total)));
new str[16];
format(str, sizeof(str), "Ram %d pts", floatround(total));
TimeTextForPlayer( playerid, str, 3000);
return 1;
}