mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
fix(clearinv): Player id definition
Fixes playerid from becoming "true" instead of the ID or source
This commit is contained in:
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user