Skip to content

Commit

Permalink
tweak(client/main): flip ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkieBb committed May 11, 2024
1 parent d30410a commit a811c6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ local function setVehicleDoorLock(veh, state, anim)
TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 5, 'lock', 0.3)
NetworkRequestControlOfEntity(veh)
if state then
state = not state and 1 or 2
state = state and 2 or 1
TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(veh), state)
exports.qbx_core:Notify(state == 2 and locale('notify.vehicle_locked') or locale('notify.vehicle_unlocked'), 'inform')
else
Expand Down

0 comments on commit a811c6f

Please sign in to comment.