Hey does anyone know how to fix cars fliping over?
Hello.
You want this option remain enabled or you want to remove this for a roleplay usage ?
King regards,
1 Like
remove for roleplay
1 Like
This code should be helpful to you, it’s taken from an old script and it’s not complete but it should help you to understand how to do this:
function disableAirControl(ped, veh)
if not IsThisModelBlacklisted(veh) then
if IsPedSittingInAnyVehicle(ped) then
if GetPedInVehicleSeat(veh, -1) == ped then
if IsEntityInAir(veh) and not IsThisModelABoat(veh) and not IsThisModelAHeli(veh) and not IsThisModelAPlane(veh) then
DisableControlAction(0, 59)
DisableControlAction(0, 60)
end
end
end
end
end
function disableVehicleRoll(ped, veh)
local roll = GetEntityRoll(veh)
if not IsThisModelBlacklisted(veh) and not IsThisModelABoat(veh) and not IsThisModelAHeli(veh) and not IsThisModelAPlane(veh) then
if GetPedInVehicleSeat(veh, -1) == ped then
if (roll > 75.0 or roll < -75.0) then
DisableControlAction(2,59,true)
DisableControlAction(2,60,true)
end
end
end
end
function IsThisModelBlacklisted(veh)
local model = GetEntityModel(veh)
for i = 1, #blacklistedModels do
if model == GetHashKey(blacklistedModels[i]) then
return true
end
end
return false
end