UpdateVehicleDamageStatus (Looking for tutorial or some explaination)
#5

Quote:
Originally Posted by Toxik
Посмотреть сообщение
i dont understand than .. can u help me too ?
i need a code for remove in all my GM car dors Driver and Co Driver
please paste me a code
Quote:
Originally Posted by Jonny5
Посмотреть сообщение
Код:
The first byte stores the state of the hood
The second byte stores the state of the trunk
The third byte stores the state of the drivers door
The fourth byte stores the state of the co-drivers door
//this is read from right to left
pawn Код:
//byte 4      byte 3    byte 2     byte 1
00000001 00000010 00000011 00000100
co-drivers    drivers    trunk       hood
Код:
The first bit stores whether the door is opened(1) or not(0) (the door will still lock (and change the first bit to 0) if closed - its just open)
The second bit stores whether the door is damaged(1) or not(0) (If you want a damaged door to turn normal you have to remove and re-attach it undamaged)
The third bit stores whether the door is removed(1) or attached(0)
The rest of the bits are empty
pawn Код:
00000001    //set the door to open
00000010    //set door to be damaged
00000100    //set door to be detached

00000011    //set the door to be opened and damaged.
For every vehicle, you will need to set the values in a for loop for each vehicle, e.g
pawn Код:
//OnGameModeInit or the function you create all your vehicles in
for(new i = 0; i < MAX_VEHICLES; i++) UpdateVehicleDamageStatus(i, panels, doors, lights, tires);
You will probably need to do that on OnVehicleSpawn and whenever you create a new vehicle (e.g by a command) in order for them to always be removed, however we aren't here to do everything for you.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)