UpdateVehicleDamageStatus() => BIT - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: UpdateVehicleDamageStatus() => BIT (
/showthread.php?tid=601002)
UpdateVehicleDamageStatus() => BIT -
BrianHarrisHun - 15.02.2016
Hello!
I would like to ask for a little help. Given a vehicle completely missing parts. I want to just improve on the rear bumper and the others remain missing.
I do not understand this 'bit' of things. Already three days looking for a solution.
Function:
UpdateVehicleDamageStatus ().
https://sampwiki.blast.hk/wiki/UpdateVehicleDamageStatus
https://sampwiki.blast.hk/wiki/DoorStates
Thank you in advance for your answers.
EDIT:
Someone explain?
Код HTML:
new panels, doors, lights, tires;
GetVehicleDamageStatus(1, panels, doors, lights, tires);
// Vehicle perhiferals
new front_left_panel = 0xf & panels;
new front_right_panel = ( ( 0xf << 4 ) & panels ) >> 4;
new rear_left_panel = ( ( 0xf << 8 ) & panels ) >> 8;
new rear_right_panel = ( ( 0xf << 12 ) & panels ) >> 12;
new wind_shield = ( ( 0xf << 16 ) & panels ) >> 16;
new front_bumper = ( ( 0xf << 20 ) & panels ) >> 20;
new rear_bumper = ( ( 0xf << 24 ) & panels ) >> 24;
new hood = 0xf & doors;
new trunk = ( ( 0xf << 8 ) & doors ) >> 8;
// Vehicle seats
new front_left_seat = ( ( 0xf << 16 ) & doors ) >> 16;
new front_right_seat = ( ( 0xf << 24 ) & doors ) >> 24;
new rear_left_seat = ( ( 0xf << 32 ) & doors ) >> 32;
new rear_right_seat = ( ( 0xf << 40 ) & doors ) >> 40;
// Tires
new tire_front_left = 1 & tires;
new tire_front_right = ( ( 1 << 1 ) & tires ) >> 1;
new tire_rear_left = ( ( 1 << 2 ) & tires ) >> 2;
new tire_rear_right = ( ( 1 << 3 ) & tires ) >> 3;
Re: UpdateVehicleDamageStatus() => BIT -
AbyssMorgan - 15.02.2016
can use this: D
EVF.inc
Re: UpdateVehicleDamageStatus() => BIT -
BrianHarrisHun - 15.02.2016
Thanks.:





