Retreive ModelFlags of a vehicle / Detect if vehicle has a trunk

As I wrote, I wanna check if a vehicle has trunk, or not.
1rst, i though that using strModelFlags in could be an option ( https://www.gtamodding.com/wiki/Handling.meta#strModelFlags ) detecting about “IS_VAN” and “IS_BIG” and so on.

So I try to use some native to retrieve this information, which leads me to “GetVehicleHandlingInt” ( http://runtime.fivem.net/doc/reference.html#_0x27396c75 ) with the perfect example : “local modelFlags = GetVehicleHandlingInt(vehicle, ‘CHandlingData’, ‘strModelFlags’)”

But, when using this example, I got in game console “Unsupported field fype ? in strModelFlags during GET_VEHICLE_HANDLING_INT” which seems relevant, because I’m asking for an INT, on an STR variable.

But, there is no “GetVehicleHandlingStr”, and badly, only a Setter for str variable ( SetVehicleHandlingField )

So, I got 2 question :
Is the “GetVehicleHandlingStr” or “GehicleHandlingField” (or similar) function is missing ?
How can I detect if my vehicle has trunk, without using handle, as it seems not working in my case ?

Have you tried this?

-- Will be -1 if the boneIndex cannot be found (aka no "boot/trunk" exists)
local boneIndex = GetEntityBoneIndexByName(Entity vehicle, "boot")

I haven’t tested this but according to the native reference it should be a plausible solution.

1 Like

Thanks for all, it works for cartrunk detection (tested for mule, youga, sanchez and sultan)