Skip to content

Commit

Permalink
fix(client): Zone logic job check
Browse files Browse the repository at this point in the history
  • Loading branch information
TheiLLeniumStudios committed Jun 19, 2022
1 parent 227d23a commit 83ea35b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/blips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ local function SetupBlips(job, gang)
for k, _ in pairs (Config.Stores) do
local blipConfig = Config.Blips[Config.Stores[k].shopType]
if ShowBlip(blipConfig, Config.Stores[k], job, gang) then
local blip = AddBlipForCoord(Config.Stores[k].coords)
local blip = AddBlipForCoord(Config.Stores[k].coords.x, Config.Stores[k].coords.y, Config.Stores[k].coords.z)
SetBlipSprite(blip, blipConfig.Sprite)
SetBlipColour(blip, blipConfig.Color)
SetBlipScale(blip, blipConfig.Scale)
Expand Down
24 changes: 10 additions & 14 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -573,25 +573,21 @@ local function SetupStoreZones()
})
storeCombo:onPlayerInOut(function(isPointInside, _, zone)
if isPointInside then
inZone = true
zoneName = zone.name
local currentStore = Config.Stores[tonumber(string.sub(zoneName, 8))]
local jobName = (currentStore.job and currentStore.job == PlayerJob.name)
if jobName == clothingRoom.requiredJob then
if CheckDuty() then
inZone = true
exports['qb-core']:DrawText('[E] Clothing Room')
if jobName == currentStore.requiredJob then
inZone = true
if zoneName == 'clothing' then
exports['qb-core']:DrawText('[E] Clothing Store')
elseif zoneName == 'barber' then
exports['qb-core']:DrawText('[E] Barber')
elseif zoneName == 'tattoo' then
exports['qb-core']:DrawText('[E] Tattoo Shop')
elseif zoneName == 'surgeon' then
exports['qb-core']:DrawText('[E] Plastic Surgeon')
end
end
if zoneName == 'clothing' then
exports['qb-core']:DrawText('[E] Clothing Store')
elseif zoneName == 'barber' then
exports['qb-core']:DrawText('[E] Barber')
elseif zoneName == 'tattoo' then
exports['qb-core']:DrawText('[E] Tattoo Shop')
elseif zoneName == 'surgeon' then
exports['qb-core']:DrawText('[E] Plastic Surgeon')
end
else
inZone = false
exports['qb-core']:HideText()
Expand Down

0 comments on commit 83ea35b

Please sign in to comment.