GetLandingGearState changed behavior


#1

This is how it’s described in native reference:

// 0x9B0F3DCA3DB0F4CD 0xA6F02670
// GetLandingGearState
int GET_LANDING_GEAR_STATE(Vehicle vehicle);
landing gear states:  
0: Deployed  
1: Closing  
2: Opening  
3: Retracted  
Old name: _GET_VEHICLE_LANDING_GEAR

This is how it actually work now:

0: Deployed
1: Closing
3: Opening
4: Retracted

Why? Should I take it into account and change my code or should I make workaround like this?

function GetLandingGearState(veh)
    local state=Citizen.InvokeNative(0x9B0F3DCA3DB0F4CD, veh, Citizen.ReturnResultAnyway(), Citizen.ResultAsInteger())
    if state>2 then state=state-1 end
    return state
end

#2

If this indeed returns different values than the documentation states, please make PR to the natives documentation repository.

FiveM can’t (pretty sure) change what the natives return