Próbáltam leszedni parancsra az elsõ-hátsó lököst de nem csinál semmit. Valakinek valami ötlet?
CMD:leszed(playerid, params[])
{
new panels, doors, lights, tires;
new veh = GetVehicleModel(GetPlayerVehicleID(playerid));
GetVehicleDamageStatus(veh, panels, doors, lights, tires);
panels = encode_panels(3, 3, 3, 3, 3, 3, 3); //ha 0 lenne megjavítja elvileg
UpdateVehicleDamageStatus(veh, panels, doors, lights, tires);
return 1;
}
encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper)
{
return flp | (frp << 4) | (rlp << | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);
}
Kösz!
Forrás:
http://wiki.sa-mp.com/wiki/OnVehicleDamageStatusUpdate