Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "refactor(es_extended): put identical object related code into one file" #1367

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
exports("getSharedObject", function()
return ESX
end)
AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
end)
exports("getSharedObject", function()
return ESX
end)

AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
end)
8 changes: 5 additions & 3 deletions [core]/es_extended/fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ shared_scripts {

'config.lua',
'config.weapons.lua',

'common/modules/*.lua',
'common/*.lua',
}

server_scripts {
Expand All @@ -30,6 +27,8 @@ server_scripts {
'server/main.lua',
'server/commands.lua',

'common/modules/*.lua',
'common/functions.lua',
'server/modules/actions.lua',
'server/modules/npwd.lua',
'server/modules/createJob.lua'
Expand All @@ -43,6 +42,9 @@ client_scripts {

'client/main.lua',

'common/modules/*.lua',
'common/functions.lua',

'common/functions.lua',
'client/modules/actions.lua',
'client/modules/death.lua',
Expand Down
9 changes: 9 additions & 0 deletions [core]/es_extended/server/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ RegisterNetEvent("esx:onPlayerSpawn", function()
ESX.Players[source].spawned = true
end)

AddEventHandler("esx:getSharedObject", function()
local Invoke = GetInvokingResource()
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/tutorials-esx/sharedevent for how to fix!"):format(Invoke))
end)

exports("getSharedObject", function()
return ESX
end)

if Config.OxInventory then
Config.PlayerFunctionOverride = "OxInventory"
SetConvarReplicated("inventory:framework", "esx")
Expand Down
Loading