mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:01:22 +00:00
Merge pull request #1669 from Kenshiin13/fix-secure-event
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
|
||||
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user