fix(es_extended): remove usage of SecureNetEvent where it's not needed

This commit is contained in:
Kenshin13
2025-07-13 08:49:36 +02:00
parent 90826b18ab
commit d93ee8eeb6
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -1541,11 +1541,11 @@ function ESX.ShowInventory()
end)
end
ESX.SecureNetEvent('esx:showNotification', ESX.ShowNotification)
RegisterNetEvent('esx:showNotification', ESX.ShowNotification)
ESX.SecureNetEvent('esx:showAdvancedNotification', ESX.ShowAdvancedNotification)
RegisterNetEvent('esx:showAdvancedNotification', ESX.ShowAdvancedNotification)
ESX.SecureNetEvent('esx:showHelpNotification', ESX.ShowHelpNotification)
RegisterNetEvent('esx:showHelpNotification', ESX.ShowHelpNotification)
AddEventHandler("onResourceStop", function(resourceName)
for i = 1, #ESX.UI.Menu.Opened, 1 do
+6 -6
View File
@@ -1,6 +1,6 @@
local pickups = {}
ESX.SecureNetEvent("esx:requestModel", function(model)
RegisterNetEvent("esx:requestModel", function(model)
ESX.Streaming.RequestModel(model)
end)
@@ -397,7 +397,7 @@ if not Config.CustomInventory then
end
----- Admin commands from esx_adminplus
ESX.SecureNetEvent("esx:tpm", function()
RegisterNetEvent("esx:tpm", function()
local GetEntityCoords = GetEntityCoords
local GetGroundZFor_3dCoord = GetGroundZFor_3dCoord
local GetFirstBlipInfoId = GetFirstBlipInfoId
@@ -529,7 +529,7 @@ local function noclipThread()
end
end
ESX.SecureNetEvent("esx:noclip", function()
RegisterNetEvent("esx:noclip", function()
ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
if not admin then
return
@@ -553,11 +553,11 @@ ESX.SecureNetEvent("esx:noclip", function()
end)
end)
ESX.SecureNetEvent("esx:killPlayer", function()
RegisterNetEvent("esx:killPlayer", function()
SetEntityHealth(ESX.PlayerData.ped, 0)
end)
ESX.SecureNetEvent("esx:repairPedVehicle", function()
RegisterNetEvent("esx:repairPedVehicle", function()
local ped = ESX.PlayerData.ped
local vehicle = GetVehiclePedIsIn(ped, false)
SetVehicleEngineHealth(vehicle, 1000)
@@ -566,7 +566,7 @@ ESX.SecureNetEvent("esx:repairPedVehicle", function()
SetVehicleDirtLevel(vehicle, 0)
end)
ESX.SecureNetEvent("esx:freezePlayer", function(input)
RegisterNetEvent("esx:freezePlayer", function(input)
if input == "freeze" then
SetEntityCollision(ESX.PlayerData.ped, false, false)
FreezeEntityPosition(ESX.PlayerData.ped, true)