[Release] Fixed Struct-Pointer Natives (GetDlcWeaponData & co)

Hello, I just fixed the following natives that use a struct pointer to return multiple values:

GetDlcVehicleData(dlcVehicleIndex)
returns: return, val1, vehicleHash, val3

GetDlcWeaponData(dlcWeaponIndex)
returns: return, emptyCheck, weaponHash, val3, weaponCost, ammoCost, ammoType, clipSize, nameLabel, descLabel, desc2Label, upperCaseNameLabel

GetDlcWeaponComponentData(dlcWeaponIndex, dlcWeapCompIndex)
returns: return, attachBone, bActiveByDefault, val3, componentHash, val5, componentCost, nameLabel, descLabel

GetWeaponHudStats(weaponHash)
returns: return, hudDamage, hudSpeed, hudCapacity, hudAccuracy, hudRange

GetWeaponComponentHudStats(componentHash)
returns: return, hudDamage, hudSpeed, hudCapacity, hudAccuracy, hudRange

Just add nativefix.lua to your resource and use the commands as intended.

The download includes a usage example that outputs all DLC weapons & stats in console.
nativefix.zip (1.8 KB)

Hope that helps anyone, have fun!
If there are other natives with useless pointers in FiveM, tell me!

8 Likes

moved it, just for youuu~