Skip to content

Commit

Permalink
fix(lib/client): internal method calls for OxPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jun 10, 2024
1 parent 28edeb9 commit 8cf2795
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/client/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end
local getters = {}

function OxPlayer:on(key, callback)
self:get(key)
self.get(key)

AddEventHandler(('ox:player:%s'):format(key), function(data)
if GetInvokingResource() == 'ox_core' and source == '' then
Expand All @@ -58,7 +58,7 @@ function OxPlayer:get(key)
if not getters[key] then
getters[key] = true

self:on(key, function(data) self[key] = data end)
self.on(key, function(data) self[key] = data end)
self[key] = OxPlayer:__call('get', key);
end

Expand Down

0 comments on commit 8cf2795

Please sign in to comment.