21.05.2012, 20:37
I'm looking for some one who can explain me how to use it properly ( i alrady saw samp wiki and completly understood what hapen with tieres, bu i need help with lights and doors, trunk , hood ect)
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
//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
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.
enum
{
evdHood_Opened = 1,
evdHood_Damaged = 2,
evdHood_Removed = 4,
evdTrunk_Opened = 256,
evdTrunk_Damaged = 512,
evdTrunk_Removed = 1024,
evdDriver_Opened = 65536,
evdDriver_Damaged = 131072,
evdDriver_Removed = 262144,
evdPassenger_Opened = 16777216,
evdPassenger_Damaged = 33554432,
evdPassenger_Removed = 67108864
}
//and for the lights
enum
{
evdLights_Drivers = 1,
evdLights_Passengers = 4,
evdLights_Rear = 64
}
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 |
Код:
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 pawn Код:
Код:
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 Код:
|
//OnGameModeInit or the function you create all your vehicles in
for(new i = 0; i < MAX_VEHICLES; i++) UpdateVehicleDamageStatus(i, panels, doors, lights, tires);