Skip to content

Commit

Permalink
Merge pull request #66 from BerkieBb/main
Browse files Browse the repository at this point in the history
Optimize, adjust html and fix a bug
  • Loading branch information
GhzGarage authored Jan 10, 2022
2 parents 3845a7b + 8156473 commit f871628
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 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 Down
4 changes: 2 additions & 2 deletions html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
<q-circular-progress class="q-ml-xs" show-value :value="stress" size="45px" :thickness="0.2" color="red" track-color="grey-9" center-color="grey-10"><q-icon name="fas fa-brain" size="19px" color="white"/>
</div>
<div v-if="showOxygen">
<q-circular-progress class="q-ml-xs" show-value :value="oxygen" size="45px" :thickness="0.2" color="blue" track-color="grey-9" center-color="grey-8"><q-icon name="fas fa-swimmer" size="19px" color="white"/>
<q-circular-progress class="q-ml-xs" show-value :value="oxygen" size="45px" :thickness="0.2" color="blue" track-color="grey-9" center-color="grey-10"><q-icon name="fas fa-swimmer" size="19px" color="white"/>
</div>
<div v-if="showStamina">
<q-circular-progress class="q-ml-xs" show-value :value="stamina" size="45px" :thickness="0.2" color="purple" track-color="grey-9" center-color="grey-8"><q-icon name="fas fa-lungs" size="19px" color="white"/>
<q-circular-progress class="q-ml-xs" show-value :value="stamina" size="45px" :thickness="0.2" color="purple" track-color="grey-9" center-color="grey-10"><q-icon name="fas fa-lungs" size="19px" color="white"/>
</div>
</div>
</div>
Expand Down

0 comments on commit f871628

Please sign in to comment.