Skip to content

Commit

Permalink
tweak(disable entervehciel() if pushtostart is false)
Browse files Browse the repository at this point in the history
  • Loading branch information
renzuzu committed Jul 24, 2021
1 parent 5bcd9cb commit b16f323
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion renzu_hud/function.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1566,6 +1566,7 @@ function Hud:sendsignaltoNUI()
end

function Hud:entervehicle()
if not config.push_start then return end
CreateThread(function()
local p = PlayerPedId()
local mycoords = GetEntityCoords(p)
Expand All @@ -1589,7 +1590,7 @@ function Hud:entervehicle()
v = GetVehiclePedIsTryingToEnter(p)
end
end
if config.enable_carui_perclass and config.carui_perclass[GetVehicleClass(v)] ~= 'modern' or not config.enable_carui_perclass and config.carui ~= 'modern' then self.entering = false return end
if config.enable_carui_perclass and config.carui_perclass[GetVehicleClass(v)] ~= 'modern' or not config.enable_carui_perclass and config.carui ~= 'modern' then self.entering = false SetVehicleEngineOn(self:getveh(),false,true,false) return end
if GetPedInVehicleSeat(v, -1) == p and not GetIsVehicleEngineRunning(v) and config.enable_carui_perclass and config.carui_perclass[GetVehicleClass(v)] == 'modern' or GetPedInVehicleSeat(v, -1) == p and not GetIsVehicleEngineRunning(v) and not config.enable_carui_perclass and config.carui == 'modern' then
self.entering = true
--print("Disable auto self.start")
Expand Down

0 comments on commit b16f323

Please sign in to comment.