Skip to content

Commit

Permalink
fix: Fixed Tracker toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
ardelan869 committed Jun 18, 2024
1 parent 9c4d1cf commit cecefda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version "cerulean"
game "gta5"
lua54 "yes"

version "1.0.0"
version "1.0.1"

shared_scripts {
"lib/*.lua",
Expand All @@ -18,4 +18,4 @@ server_scripts {
"bridge/server/*.lua",
"server/version.lua",
"server/main.lua"
}
}
7 changes: 6 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ RegisterUsableItem(Config.Item, function(source)

::continue::

trackers[jobName][source] = trackers[jobName][source] and nil or GetCharName(source)
if trackers[jobName][source] then
trackers[jobName][source] = nil
else
trackers[jobName][source] = GetCharName(source)
end

trackedUsers[source] = trackers[jobName][source] and jobName or nil

Config.Notify(source, trackers[jobName][source] and "Tracker enabled." or "Tracker disabled.")
Expand Down

0 comments on commit cecefda

Please sign in to comment.