Merge pull request #659 from Qwerty1Verified/patch-1

🐛fix(clearinv): Player id definition
This commit is contained in:
Kakarot
2022-06-15 17:51:43 -07:00
committed by GitHub
+1 -1
View File
@@ -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()