altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

Add getter & setter for various vehicle properties (huge list..) #355

Open DurtyFree opened 4 years ago

DurtyFree commented 4 years ago

Is your feature request related to a problem? Please describe. Currently it is not possible to get those vehicle properties / values. Those are needed to get complete control of a vehicles engine for example, so you could "script engine sounds" or set other properties that are used in vehicles dashboard etc.

Describe the solution you'd like I want getter & setter for following vehicle properties:

I want getter for following vehicle properties (those are mainly get only):

Describe alternatives you've considered There is no alternative as you are not able to retrieve those values any other way.

Additional context These are the sources I used to retrieve the data: SHVDN has some memory offsets & patterns https://github.com/crosire/scripthookvdotnet/blob/7404127c162e7956b8b86b86fdc72a9aa9e44670/source/scripting_v3/GTA/Entities/Vehicles/Vehicle.cs Patterns for some values https://github.com/crosire/scripthookvdotnet/blob/7404127c162e7956b8b86b86fdc72a9aa9e44670/source/core/NativeMemory.cs#L148 Manual Transmissions mod has a lot of offsets & patterns: https://github.com/E66666666/GTAVManualTransmission/blob/c8e67ef29d36b949b34d9905e2ea00197e692cd8/Gears/Memory/VehicleExtensions.cpp https://github.com/E66666666/GTAVManualTransmission/blob/c93cd2bc0e16ad69ae86139391125fcdc34c1b5c/Gears/Memory/MemoryPatcher.cpp FiveM has also a lot of offsets & patterns: https://github.com/citizenfx/fivem/blob/master/code/components/extra-natives-five/src/VehicleExtraNatives.cpp

LameuleFR commented 4 years ago

Yes my friend, a very nice idea.

DurtyFree commented 4 years ago

I have updated the list & added getter / setter for deluxo & Oppressor transformation state, its also retrievable via memory -> a float value between 0 and 1 indicating current transformation state.

lsvMoretti commented 4 years ago

Could we also add a getter for vehicle class to this @DurtyFree ?

DurtyFree commented 4 years ago

@lsvMoretti I think you can already get vehicle class with native getVehicleClassFromName http://natives.altv.mp/#/0xDEDF1C8BD47C2200

DurtyFree commented 4 years ago

Just enhancing this with this great source for some patterns and memory offsets: https://github.com/citizenfx/fivem/blob/master/code/components/extra-natives-five/src/VehicleExtraNatives.cpp

jovanivanovic commented 4 years ago

Would make a great addition to vehicles. +1

DurtyFree commented 3 years ago

@ZackaryH8 Please explain in words what exact getters / setters

Refikk commented 2 years ago

These features should definitely come in 7.0.

C0kkie commented 2 years ago

7.0 is already finished and 8.0 already have a huge list