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 5c40c08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ end
exports('addAccountMoney', AddAccountMoney)

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

0 comments on commit 5c40c08

Please sign in to comment.