From ad57a480b34367dc6fd4a7e155582ddc888d40ff Mon Sep 17 00:00:00 2001 From: Joel <34402846+Qwerty1Verified@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:35:09 +0100 Subject: [PATCH] fix(clearinv): Player id definition Fixes playerid from becoming "true" instead of the ID or source --- server/commands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/commands.lua b/server/commands.lua index 125a1ea..5328add 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()