Skip to content

Commit

Permalink
Catch nil
Browse files Browse the repository at this point in the history
  • Loading branch information
GhzGarage committed Oct 14, 2023
1 parent c6742b6 commit 94b1a7f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ end)
RegisterNetEvent("weapons:server:UpdateWeaponAmmo", function(CurrentWeaponData, amount)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
amount = tonumber(amount)
if CurrentWeaponData then
if Player.PlayerData.items[CurrentWeaponData.slot] then
Expand Down

0 comments on commit 94b1a7f

Please sign in to comment.