18.01.2014, 06:07
0.3z version car empty car wheel not burst
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
switch(hittype)
{
case BULLET_HIT_TYPE_VEHICLE:
{
/*new Float:X, Float:Y, Float:Z;
GetVehicleModelInfo(hitid, VEHICLE_MODEL_INFO_PETROLCAP, X, Y, Z);*/
new Float:Offset[6];
GetVehicleModelInfo(hitid, VEHICLE_MODEL_INFO_WHEELSFRONT, Offset[0], Offset[1], Offset[2]);
GetVehicleModelInfo(hitid, VEHICLE_MODEL_INFO_WHEELSREAR, Offset[3], Offset[4], Offset[5]);
if(fX == Offset[0] && fY == Offset[1] && fZ == Offset[2]) // Around shooted offsets (to do)
{
PopVehicleTire(hitid, 10);
}
else if(fX == Offset[3] && fY == Offset[4] && fZ == Offset[5]) // Around shooted offsets (to do)
{
PopVehicleTire(hitid, 5);
}
}
}
return 1;
}
stock PopVehicleTire(vehicleid, tire)
{
static panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tire);
}