Skip to content

Commit

Permalink
chore(client): Optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkieBb authored Jan 9, 2022
1 parent ed79a59 commit 8156473
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ local lastCrossroadCheck = {}

local function getCrossroads(player)
local updateTick = GetGameTimer()
if (updateTick - lastCrossroadUpdate) > 1500 then
if updateTick - lastCrossroadUpdate > 1500 then
local pos = GetEntityCoords(player)
local street1, street2 = GetStreetNameAtCoord(pos.x, pos.y, pos.z)
lastCrossroadUpdate = updateTick
Expand Down Expand Up @@ -132,12 +132,13 @@ CreateThread(function()
if LocalPlayer.state.isLoggedIn then
local show = true
local player = PlayerPedId()
local playerId = PlayerId()
-- player hud
local oxygen = GetPlayerUnderwaterTimeRemaining(PlayerId()) * 10
local stamina = GetPlayerSprintStaminaRemaining(PlayerId()) * 1
local talking = NetworkIsPlayerTalking(PlayerId())
local oxygen = GetPlayerUnderwaterTimeRemaining(playerId) * 10
local stamina = GetPlayerSprintStaminaRemaining(playerId)
local talking = NetworkIsPlayerTalking(playerId)
local voice = 0
if LocalPlayer.state['proximity'] ~= nil then
if LocalPlayer.state['proximity'] then
voice = LocalPlayer.state['proximity'].distance
end
if IsPauseMenuActive() then
Expand All @@ -152,7 +153,6 @@ CreateThread(function()
stress,
oxygen,
stamina,
talking,
voice,
LocalPlayer.state['radioChannel'],
talking
Expand Down

0 comments on commit 8156473

Please sign in to comment.