diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index 8599666d6..ea49ba17f 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -14,7 +14,7 @@ local function ApplyMetadata(metadata) end end -ESX.SecureNetEvent("esx:playerLoaded", function(xPlayer, _, skin) +RegisterNetEvent("esx:playerLoaded", function(xPlayer, _, skin) ESX.PlayerData = xPlayer if not Config.Multichar then diff --git a/[core]/es_extended/client/modules/npwd.lua b/[core]/es_extended/client/modules/npwd.lua index 98ff92e60..a1aa73a8f 100644 --- a/[core]/es_extended/client/modules/npwd.lua +++ b/[core]/es_extended/client/modules/npwd.lua @@ -9,7 +9,7 @@ local function checkPhone() npwd:setPhoneDisabled((phoneItem and phoneItem.count or 0) <= 0) end -ESX.SecureNetEvent("esx:playerLoaded", checkPhone) +RegisterNetEvent("esx:playerLoaded", checkPhone) AddEventHandler("onClientResourceStart", function(resource) if resource ~= "npwd" then diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua index 7357675e1..c4bb76c77 100644 --- a/[core]/es_extended/imports.lua +++ b/[core]/es_extended/imports.lua @@ -12,7 +12,7 @@ if not IsDuplicityVersion() then -- Only register this event for the client end end) - ESX.SecureNetEvent("esx:playerLoaded", function(xPlayer) + RegisterNetEvent("esx:playerLoaded", function(xPlayer) ESX.PlayerData = xPlayer ESX.PlayerLoaded = true end) diff --git a/[core]/esx_multicharacter/client/main.lua b/[core]/esx_multicharacter/client/main.lua index 33568bc68..0e6da55ce 100644 --- a/[core]/esx_multicharacter/client/main.lua +++ b/[core]/esx_multicharacter/client/main.lua @@ -33,7 +33,7 @@ ESX.SecureNetEvent("esx_multicharacter:SetupUI", function(data, slots) Multicharacter:SetupUI(data, slots) end) -ESX.SecureNetEvent('esx:playerLoaded', function(playerData, isNew, skin) +RegisterNetEvent('esx:playerLoaded', function(playerData, isNew, skin) Multicharacter:PlayerLoaded(playerData, isNew, skin) end) diff --git a/[core]/esx_skin/client/main.lua b/[core]/esx_skin/client/main.lua index 7240ae839..a26249087 100644 --- a/[core]/esx_skin/client/main.lua +++ b/[core]/esx_skin/client/main.lua @@ -70,7 +70,7 @@ AddEventHandler("esx_skin:playerRegistered", function() end) end) -ESX.SecureNetEvent("esx:playerLoaded", function(_, _, skin) +RegisterNetEvent("esx:playerLoaded", function(_, _, skin) ESX.PlayerLoaded = true TriggerServerEvent("esx_skin:setWeight", skin) end) @@ -80,7 +80,7 @@ RegisterNetEvent("esx_skin:openMenu", function(submitCb, cancelCb) end) RegisterNetEvent("esx_skin:openRestrictedMenu", function(submitCb, cancelCb, restrict) - Menu:Open(submitCb, cancelCb, nil) + Menu:Open(submitCb, cancelCb, restrict) end) RegisterNetEvent("esx_skin:openSaveableMenu", function(submitCb, cancelCb)