Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
fix(client): only change success sprite if Config.DrawSprite is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
BerkieBb committed Apr 19, 2022
1 parent 079834e commit 0f303d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,9 @@ local function EnableTarget()
if next(nuiData) then
success = true
SendNUIMessage({response = 'validTarget', data = nuiData})
listSprite[closestZone.name].success = true
if Config.DrawSprite then
listSprite[closestZone.name].success = true
end
DrawOutlineEntity(entity, true)
while targetActive and success do
local coords, distance = RaycastCamera(flag)
Expand All @@ -435,7 +437,7 @@ local function EnableTarget()
end
Wait(0)
end
if listSprite[closestZone.name] then -- Check for when the targetActive is false and it removes the zone from listSprite
if Config.DrawSprite and listSprite[closestZone.name] then -- Check for when the targetActive is false and it removes the zone from listSprite
listSprite[closestZone.name].success = false
end
LeaveTarget()
Expand Down

0 comments on commit 0f303d5

Please sign in to comment.