From e05e7f724f1dd429e77caf558e0aff0f47d10caa Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 2 Mar 2022 02:27:28 +0000 Subject: [PATCH] fix(server): prevent loading for unselected characters --- fxmanifest.lua | 2 +- server/main.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fxmanifest.lua b/fxmanifest.lua index 5298d890..f9f9be79 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -6,7 +6,7 @@ game 'gta5' --[[ Resource Information ]]-- name 'ox_core' -version '0.0.1' +version '0.0.2' description 'What have I done?' license 'GPL-3.0-or-later' author 'overextended' diff --git a/server/main.lua b/server/main.lua index 4cd32d95..8ee9f84a 100644 --- a/server/main.lua +++ b/server/main.lua @@ -14,13 +14,13 @@ end) AddEventHandler('onServerResourceStart', function(resource) if resource == 'ox_inventory' then for _, obj in pairs(player.list) do - if obj.charid then + if not obj.characters then obj:loadInventory() end end elseif resource == 'npwd' then for _, obj in pairs(player.list) do - if obj.charid then + if not obj.characters then obj:loadPhone() end end