Skip to content

Commit

Permalink
Refactored: Use precomputed hash keys for weapon checks
Browse files Browse the repository at this point in the history
Co-authored-by: Joel <[email protected]>
  • Loading branch information
adhershmnair and Qwerty1Verified authored Nov 26, 2024
1 parent 8691713 commit fad44d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ function ClearInventory(source, filterItems)
TriggerEvent('qb-log:server:CreateLog', 'playerinventory', 'ClearInventory', 'red', logMessage)
local ped = GetPlayerPed(source)
local weapon = GetSelectedPedWeapon(ped)
if weapon ~= GetHashKey('WEAPON_UNARMED') then
if weapon ~= `WEAPON_UNARMED` then
RemoveWeaponFromPed(ped, weapon)
end
if Player(source).state.inv_busy then TriggerClientEvent('qb-inventory:client:updateInventory', source) end
Expand Down

0 comments on commit fad44d8

Please sign in to comment.