Skip to content

Commit

Permalink
Update main.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrachStack authored Nov 12, 2023
1 parent 67ef9bd commit fdbe083
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ if GetResourceState('qb-core') ~= 'missing' then
QBCore = exports['qb-core']:GetCoreObject()
UseQB = true
end
if UseEsx then
AddEventHandler("weaponDamageEvent", function(sender, data)
if UseEsx and Config.Antitaze.Enabled then
local _src = sender
Expand All @@ -165,10 +164,8 @@ AddEventHandler("weaponDamageEvent", function(sender, data)
end
end
end)
end
if UseQB then
AddEventHandler("weaponDamageEvent", function(sender, data)
if UseEsx and Config.Antitaze.Enabled then
if UseQB and Config.Antitaze.Enabled then
local _src = sender
local xPlayer = QBCore.Functions.GetPlayer(_src)
if xPlayer ~= nil and not Config.Antitaze.WhitelistedJobs[xPlayer.job.name] and data.weaponType == 911657153 or data.weaponType == joaat("WEAPON_STUNGUN") then
Expand All @@ -178,4 +175,3 @@ AddEventHandler("weaponDamageEvent", function(sender, data)
end
end
end)
end

0 comments on commit fdbe083

Please sign in to comment.