Skip to content

Commit

Permalink
🚑fix(esx_policejob/client/main): fix vulnerability
Browse files Browse the repository at this point in the history
vulnerability fixed
  • Loading branch information
Thekuca authored Feb 22, 2024
1 parent c62253c commit b0b15c8
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@ local HasAlreadyEnteredMarker, isDead, isHandcuffed, hasAlreadyJoined, playerInS
local LastStation, LastPart, LastPartNum, LastEntity, CurrentAction, CurrentActionMsg
dragStatus.isDragged, isInShopMenu = false, false

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
ESX.PlayerData = xPlayer
ESX.PlayerLoaded = true
end)

RegisterNetEvent('esx:onPlayerLogout')
AddEventHandler('esx:onPlayerLogout', function()
ESX.PlayerLoaded = false
ESX.PlayerData = {}
end)

function cleanPlayer(playerPed)
SetPedArmour(playerPed, 0)
ClearPedBloodDamage(playerPed)
Expand Down Expand Up @@ -958,14 +946,13 @@ function OpenPutStocksMenu()
end)
end

RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
ESX.PlayerData.job = job
if job.name == 'police' then
function OnPlayerData(k, v)
if k ~= 'job' then return end
if v.name == 'police' then
Wait(1000)
TriggerServerEvent('esx_policejob:forceBlip')
end
end)
end

RegisterNetEvent('esx_phone:loaded')
AddEventHandler('esx_phone:loaded', function(phoneNumber, contacts)
Expand Down

0 comments on commit b0b15c8

Please sign in to comment.