Skip to content

Commit

Permalink
Disable controls when outside vehicle
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
Flohhhhh committed Sep 9, 2023
1 parent 55eed11 commit 2158f52
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ulc/client/c_buttons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ end)
-- updates ui whenever extra is used in a button
function ULC:SetStage(extra, action, playSound, extraOnly, repair, force)
if not MyVehicle then print("[ULC:SetStage()] MyVehicle is not defined right now :/") return false end
-- could add a config switch to allow this later but that may cause issues
if not IsPedInAnyVehicle(PlayerPedId(), true) then print("[ULC:SetStage()] Player is not in a vehicle :/") return false end

local newState
--print("[ulc:SetStage]", extra, action, playSound, extraOnly)
Expand Down

0 comments on commit 2158f52

Please sign in to comment.