Documenting GTA-SA memory adresses

AlexTMjugador

Thank you very much Seeman, but that isn't what I was looking for. Forgive me if I explained myself wrong

What I want to know is the memory adress of a CVehicle class method for toggling the engine broken state of a vehicle, if it exists. For example, I know that there's a method in that class to set vehicle engine state (whether it's on or off) at adress 0x41BDD0:CVehicle::SetEngineOn(bool). I only mentioned that opcode because it's kinda related with the method I said, functionality-wise (altrough I know they're different things code-wise, of course).

Seemann

Well, you know, it's just a flag, one bit in the particular field in a CVehicle struct. You dont need a method to switch one bit. That's why the method you're looking for does not exist. Use the code above.

0x6ACCD0 : Begins an array holding some vehicle siren attributes (via model), each index in the array in the byte, meaning:0 -> 2 Sirens1 -> 1st type of single siren2 -> 2nd type of single siren (doesn't seem as good as the first (less floats))4 -> Nothing0x6ACDAC : If the first array says 2 sirens it comes to this array and chooses what siren offset to use (via model again), each index in the array is still a byte:0 -> 1st type of double siren1 -> 2nd type of double siren2 -> 3rd type of double siren3 -> 4th type of double siren4 -> 5th type of double siren5 -> No Siren0x6AB36D : switch(SingleSiren[vehiclemodel])0x6AB39F : switch(DoubleSiren[vehiclemodel])0x6ACA37 : Hardcoded Model Switches0X6FC580 : DrawSirenParticle0x6ABA60 : call DrawSirenParticle (NOP to disable sirens appearing)0x4F62A0 : GetSirenSound0x4F62BB : mov dl,[ecx+0x42D] (Get the siren true/false value, NOP to disable siren sounds)0x501BA8 : Siren Sound array, each in the array is still a byte:0 -> 1st type of siren sound1 -> 2nd type of siren sound2 -> 3rd type of siren sound3 -> 4th type of siren sound5 -> 5th type of siren sound6 -> No siren sound0x501AB0 : ProcSirenSound0x501AD6 : switch(SirenSnds[vehiclemodel])0x6D8470 : DoesModelContainSiren0x6D84AC : SirenModelArray, only contains models below first police model, each index is a byte where the index is modelid:0 -> Yes1 -> No2 -> Goto IsModelPolice0x6D2370 : IsModelPolice0x6D239C : PoliceModelArray, seems to start off where the other models left off (from DoesModelContainSiren), each index is a byte where the index is modelid:0 -> Yes1 -> NoTo make the game 'think' every model contains a siren write mov al,1 + retn to the start of the func, or (0xB0 0x01 0xC3), same can be done with the Police check

Contrary to popular belief the values in these switches aren't colours, they are floats defining where the sirens appear on the vehicle, colours are not accounted for as of yet (despite what misinformed people may tell you), However this information does give us the ability to decide which vehicles can use which type of siren and where there rendered on the vehicle (SALA already gives you this in a limited way)

EDIT:

I managed to get sirens on heaps of other vehicles (by hacking the arrays) including working sounds, here's a screen of the blista

Washington:

Some other random car:

It's interesting to note that although one colour was red the other was nothing (just light), which means I must have clipped the colour somewhere in my memory editing