28.07.2011, 13:58
There is a temporary solution to problem with RepairVehicle adding wheel at the tail of the Stuntplane (#13). See the code:
pawn Код:
/* Description:
Prevent form adding 2 unnecessary back wheels to a stuntplane,
when updating It's damage status.
*/
#if defined VEHICLE_DAMAGE_FIX_INCLUDED
#endinput
#endif
#define VEHICLE_DAMAGE_FIX_INCLUDED
#include <a_samp.inc>
stock Fix_GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires)
{
new ret = GetVehicleDamageStatus(vehicleid,panels,doors,lights,tires);
if( GetVehicleModel(vehicleid) == 513 ) lights |= 1;
return ret;
}
stock Fix_UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires)
return UpdateVehicleDamageStatus(vehicleid, panels, doors, lights | _:(GetVehicleModel(vehicleid)==513), tires);
#define GetVehicleDamageStatus Fix_GetVehicleDamageStatus
#define UpdateVehicleDamageStatus Fix_UpdateVehicleDamageStatus
#define RepairVehicle(%0) UpdateVehicleDamageStatus_Fixed((%0),0,0,0,0)