[RD]Chez, уж извиняйте, с побитовыми операциями работать не умею, сделал как смог.
Вообще, способов есть несколько. Я ещё видел такие:
Set
Code
SetVehicleTireStatus(vehicleid, FL=0, BL=0, FR=0, BR=0) { // by Frog163
static panels, doors, lights, tires;
GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, (FL*floatpower(2,3))+(BL*floatpower(2,2))+(FR*2));
return 1;
}
Get
Code
GetVehicleTireStatus(vehicleid, &FL, &BL, &FR, &BR) //by Frog163
{
static status;
GetVehicleDamageStatus(vehicleid, status, status, status, status);
BR = status % 2;
FR = (status / 2) % 2;
BL = ((status / 2) / 2) % 2;
FL = (((status / 2) / 2) / 2) % 2;
return true;
}