Skip to content

Commit

Permalink
fix(server/main): fix issue with obtaining playerdata
Browse files Browse the repository at this point in the history
  • Loading branch information
solareon committed Sep 11, 2024
1 parent 9b60fc2 commit f3dbb05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ end
exports('addAccountMoney', AddAccountMoney)

local function getPlayerData(source, id)
local Player = GetPlayerObject(tonumber(id))
if not Player then Player = GetPlayerObjectFromID(id) end
local Player = source and GetPlayerObject(source) or GetPlayerObjectFromID(id)
if not Player then
local msg = ("Cannot Find Account(%s)"):format(id)
print(locale("invalid_account", id))
Expand Down

0 comments on commit f3dbb05

Please sign in to comment.