From f3dbb0531120a5938fb0a035114c8b127caf854f Mon Sep 17 00:00:00 2001 From: Solareon <769465+solareon@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:06:28 +0200 Subject: [PATCH] fix(server/main): fix issue with obtaining playerdata --- server/main.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/main.lua b/server/main.lua index 423123b..38d249f 100644 --- a/server/main.lua +++ b/server/main.lua @@ -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))