Binary/Bits stuff for tire popping - 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: Binary/Bits stuff for tire popping (
/showthread.php?tid=410505)
Binary/Bits stuff for tire popping -
MP2 - 25.01.2013
This is something I really need to learn..
This code makes the back two tires pop:
pawn Код:
GetVehicleDamageStatus(vehicleid, Panels, Doors, Lights, Tires);
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, 1 | (0 << 1) | (1 << 2) | (0 << 3));
But the problem is, it makes the front two NOT popped - repairing them if they are already popped. How do I make it so it keeps any others popped?
https://sampwiki.blast.hk/wiki/TireStates
Re: Binary/Bits stuff for tire popping -
Vince - 25.01.2013
pawn Код:
UpdateVehicleDamageStatus(vehicleid, Panels, Doors, Lights, (Tires | 0b0101));
That should work.
Re: Binary/Bits stuff for tire popping -
MP2 - 25.01.2013
Aha! Thanks!