Skip to content

Commit

Permalink
Inventory Update
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage committed May 20, 2024
1 parent ac16773 commit 89b3e46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions client/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ local isSpectating = false

-- Events

RegisterNetEvent('qb-admin:client:inventory', function(targetPed)
TriggerServerEvent('inventory:server:OpenInventory', 'otherplayer', targetPed)
end)

RegisterNetEvent('qb-admin:client:spectate', function(targetPed)
local myPed = PlayerPedId()
local targetplayer = GetPlayerFromServerId(targetPed)
Expand Down
5 changes: 2 additions & 3 deletions server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ RegisterNetEvent('qb-admin:server:intovehicle', function(player)
end
end)


RegisterNetEvent('qb-admin:server:bring', function(player)
local src = source
if QBCore.Functions.HasPermission(src, permissions['bring']) or IsPlayerAceAllowed(src, 'command') then
Expand All @@ -206,7 +205,7 @@ end)
RegisterNetEvent('qb-admin:server:inventory', function(player)
local src = source
if QBCore.Functions.HasPermission(src, permissions['inventory']) or IsPlayerAceAllowed(src, 'command') then
TriggerClientEvent('qb-admin:client:inventory', src, player.id)
exports['qb-inventory']:OpenInventoryById(src, player.id)
else
BanPlayer(src)
end
Expand Down Expand Up @@ -248,7 +247,7 @@ RegisterServerEvent('qb-admin:giveWeapon', function(weapon)
local src = source
if QBCore.Functions.HasPermission(src, 'admin') or IsPlayerAceAllowed(src, 'command') then
local Player = QBCore.Functions.GetPlayer(src)
Player.Functions.AddItem(weapon, 1)
exports['qb-inventory']:AddItem(src, weapon, 1, false, false, 'qb-admin:giveWeapon')
else
BanPlayer(src)
end
Expand Down

0 comments on commit 89b3e46

Please sign in to comment.