mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
fix(es_extended): remove usage of SecureNetEvent where it's not needed
This commit is contained in:
@@ -1541,11 +1541,11 @@ function ESX.ShowInventory()
|
|||||||
end)
|
end)
|
||||||
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)
|
AddEventHandler("onResourceStop", function(resourceName)
|
||||||
for i = 1, #ESX.UI.Menu.Opened, 1 do
|
for i = 1, #ESX.UI.Menu.Opened, 1 do
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local pickups = {}
|
local pickups = {}
|
||||||
|
|
||||||
ESX.SecureNetEvent("esx:requestModel", function(model)
|
RegisterNetEvent("esx:requestModel", function(model)
|
||||||
ESX.Streaming.RequestModel(model)
|
ESX.Streaming.RequestModel(model)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -397,7 +397,7 @@ if not Config.CustomInventory then
|
|||||||
end
|
end
|
||||||
|
|
||||||
----- Admin commands from esx_adminplus
|
----- Admin commands from esx_adminplus
|
||||||
ESX.SecureNetEvent("esx:tpm", function()
|
RegisterNetEvent("esx:tpm", function()
|
||||||
local GetEntityCoords = GetEntityCoords
|
local GetEntityCoords = GetEntityCoords
|
||||||
local GetGroundZFor_3dCoord = GetGroundZFor_3dCoord
|
local GetGroundZFor_3dCoord = GetGroundZFor_3dCoord
|
||||||
local GetFirstBlipInfoId = GetFirstBlipInfoId
|
local GetFirstBlipInfoId = GetFirstBlipInfoId
|
||||||
@@ -529,7 +529,7 @@ local function noclipThread()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ESX.SecureNetEvent("esx:noclip", function()
|
RegisterNetEvent("esx:noclip", function()
|
||||||
ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
|
ESX.TriggerServerCallback("esx:isUserAdmin", function(admin)
|
||||||
if not admin then
|
if not admin then
|
||||||
return
|
return
|
||||||
@@ -553,11 +553,11 @@ ESX.SecureNetEvent("esx:noclip", function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ESX.SecureNetEvent("esx:killPlayer", function()
|
RegisterNetEvent("esx:killPlayer", function()
|
||||||
SetEntityHealth(ESX.PlayerData.ped, 0)
|
SetEntityHealth(ESX.PlayerData.ped, 0)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ESX.SecureNetEvent("esx:repairPedVehicle", function()
|
RegisterNetEvent("esx:repairPedVehicle", function()
|
||||||
local ped = ESX.PlayerData.ped
|
local ped = ESX.PlayerData.ped
|
||||||
local vehicle = GetVehiclePedIsIn(ped, false)
|
local vehicle = GetVehiclePedIsIn(ped, false)
|
||||||
SetVehicleEngineHealth(vehicle, 1000)
|
SetVehicleEngineHealth(vehicle, 1000)
|
||||||
@@ -566,7 +566,7 @@ ESX.SecureNetEvent("esx:repairPedVehicle", function()
|
|||||||
SetVehicleDirtLevel(vehicle, 0)
|
SetVehicleDirtLevel(vehicle, 0)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ESX.SecureNetEvent("esx:freezePlayer", function(input)
|
RegisterNetEvent("esx:freezePlayer", function(input)
|
||||||
if input == "freeze" then
|
if input == "freeze" then
|
||||||
SetEntityCollision(ESX.PlayerData.ped, false, false)
|
SetEntityCollision(ESX.PlayerData.ped, false, false)
|
||||||
FreezeEntityPosition(ESX.PlayerData.ped, true)
|
FreezeEntityPosition(ESX.PlayerData.ped, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user