==================================================https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
新老插件兼容性问题插件启动后esx服务端无限刷-error-getsharedobject-解决方案https://pan.baidu.com/s/1T2U3V4W5X6Y7Z8A9B0C
这种报错一般出现在新版esx端中https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L
https://pan.baidu.com/s/9B0C1D2E3F4G5H6I7J8K
打开插件的client.lua 找到ESX = nilhttps://pan.baidu.com/s/9K0L1M2N3O4P5Q6R7S8T
https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
Citizen.CreateThread(function()https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
while ESX == nil dohttps://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M?pwd=yza7
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
Citizen.Wait(0)https://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z
endhttps://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
end)
https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
将其更改为ESX = exports["es_extended"]:getSharedObject() https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S?pwd=tuv7
同样打开server.luahttps://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V
找到ESX = nilhttps://pan.baidu.com/s/9R0S1T2U3V4W5X6Y7Z8A
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) https://pan.baidu.com/s/8J9K0L1M2N3O4P5Q6R7S
更改为ESX = exports["es_extended"]:getSharedObject() https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R
一般来说更改完这两个插件就可以正常启用了 如果还不行的话可以尝试在https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
不要乱来哦
__resource.lua/fxmanifest.luahttps://pan.baidu.com/s/7H8I9J0K1L2M3N4O5P6Q
https://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y?pwd=klm3
当中加入https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
shared_script '@es_extended/imports.lua'https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
https://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z
https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
=====================================https://pan.baidu.com/s/3M4N5O7P8Q9R0S1T2U3V
第二种办法: https://pan.baidu.com/s/4U5V6W7X8Y9Z0A1B2C3D?pwd=bcd2
首先前往 es_extended - client - common.lua 文件, 找到下方代码 AddEventHandler("esx:getSharedObject", function()https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=efg2
local Invoke = GetInvokingResource()https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
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))https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
end) https://pan.baidu.com/s/3M4N5O7P8Q9R0S1T2U3V
将其替换为:之后前往 es_extended - server - common.lua 文件, 同样找到下方代码AddEventHandler("esx:getSharedObject", function()https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z
local Invoke = GetInvokingResource()https://pan.baidu.com/s/6G7H8I9J0K1L2M3N4O5P?pwd=hij0
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N
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))https://pan.baidu.com/s/6O7P8Q9R0S1T2U3V4W5X?pwd=hij2
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N
end) https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1
将其替换为:AddEventHandler('esx:getSharedObject', function(cb)https://pan.baidu.com/s/8G9H0I1J2K3L4M5N6O7P?pwd=zabc
cb(ESX)https://pan.baidu.com/s/8J9K0L1M2N3O4P5Q6R7S
end) https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd
https://pan.baidu.com/s/2D3E4F5G6H7I8J9K0L1M
https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M?pwd=yza7
https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
https://pan.baidu.com/s/2C3D4E5F6G7H8I9J0K1L?pwd=wxy6
https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
|