diff --git a/server/commands.lua b/server/commands.lua index e9aacf0..fdcf590 100644 --- a/server/commands.lua +++ b/server/commands.lua @@ -208,7 +208,7 @@ end, 'admin') -- Inventory (should be in qb-inventory?) QBCore.Commands.Add('clearinv', 'Clear Players Inventory (Admin Only)', { { name = 'id', help = 'Player ID' } }, false, function(source, args) - local playerId = args[1] and args[1] ~= '' or source + local playerId = args[1] ~= '' and args[1] or source local Player = QBCore.Functions.GetPlayer(tonumber(playerId)) if Player then Player.Functions.ClearInventory()