@@ -95,7 +95,7 @@ local lastCrossroadCheck = {}
95
95
96
96
local function getCrossroads (player )
97
97
local updateTick = GetGameTimer ()
98
- if ( updateTick - lastCrossroadUpdate ) > 1500 then
98
+ if updateTick - lastCrossroadUpdate > 1500 then
99
99
local pos = GetEntityCoords (player )
100
100
local street1 , street2 = GetStreetNameAtCoord (pos .x , pos .y , pos .z )
101
101
lastCrossroadUpdate = updateTick
@@ -132,12 +132,13 @@ CreateThread(function()
132
132
if LocalPlayer .state .isLoggedIn then
133
133
local show = true
134
134
local player = PlayerPedId ()
135
+ local playerId = PlayerId ()
135
136
-- player hud
136
- local oxygen = GetPlayerUnderwaterTimeRemaining (PlayerId () ) * 10
137
- local stamina = GetPlayerSprintStaminaRemaining (PlayerId ()) * 1
138
- local talking = NetworkIsPlayerTalking (PlayerId () )
137
+ local oxygen = GetPlayerUnderwaterTimeRemaining (playerId ) * 10
138
+ local stamina = GetPlayerSprintStaminaRemaining (playerId )
139
+ local talking = NetworkIsPlayerTalking (playerId )
139
140
local voice = 0
140
- if LocalPlayer .state [' proximity' ] ~= nil then
141
+ if LocalPlayer .state [' proximity' ] then
141
142
voice = LocalPlayer .state [' proximity' ].distance
142
143
end
143
144
if IsPauseMenuActive () then
@@ -152,7 +153,6 @@ CreateThread(function()
152
153
stress ,
153
154
oxygen ,
154
155
stamina ,
155
- talking ,
156
156
voice ,
157
157
LocalPlayer .state [' radioChannel' ],
158
158
talking
0 commit comments