==================================================https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1
新老插件兼容性问题插件启动后esx服务端无限刷-error-getsharedobject-解决方案https://pan.baidu.com/s/5M6N7O8P9Q0R1S2T3U4V?pwd=wxyz
这种报错一般出现在新版esx端中https://pan.baidu.com/s/8R0S1T2U3V4W5X6Y7Z8A
https://pan.baidu.com/s/4W5X6Y7Z8A9B0C1D2E3F
打开插件的client.lua 找到ESX = nilhttps://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=stu8
https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
Citizen.CreateThread(function()https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4
while ESX == nil dohttps://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q
https://pan.baidu.com/s/1T2U3V4W5X6Y7Z8A9B0C
Citizen.Wait(0)https://pan.baidu.com/s/8I9J0K1L2M3N4O5P6Q7R
endhttps://pan.baidu.com/s/2S3T4U5V6W7X8Y9Z0A1B?pwd=uvwx
end) 哈哈
将其更改为ESX = exports["es_extended"]:getSharedObject() https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
同样打开server.luahttps://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
找到ESX = nilhttps://pan.baidu.com/s/5N6O7P8Q9R0S1T2U3V4W
https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) https://pan.baidu.com/s/1J2K3L4M5N6O7P8Q9R0S
更改为ESX = exports["es_extended"]:getSharedObject() https://pan.baidu.com/s/5P6Q7R8S9T0U1V2W3X4Y
一般来说更改完这两个插件就可以正常启用了 如果还不行的话可以尝试在https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K
https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
__resource.lua/fxmanifest.luahttps://pan.baidu.com/s/7P8Q9R0S1T2U3V4W5X6Y
https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M?pwd=yza7
当中加入https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
shared_script '@es_extended/imports.lua'https://pan.baidu.com/s/4E5F6G7H8I9J0K1L2M3N?pwd=bcd8
https://pan.baidu.com/s/8J9K0L1M2N3O4P5Q6R7S
https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst
=====================================https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
第二种办法: https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0
首先前往 es_extended - client - common.lua 文件, 找到下方代码 AddEventHandler("esx:getSharedObject", function()https://pan.baidu.com/s/9H0I1J2K3L4M5N6O7P8Q?pwd=cdef
local Invoke = GetInvokingResource()https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
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/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
end) https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
将其替换为:AddEventHandler('esx:getSharedObject', function(cb)https://pan.baidu.com/s/2C3D4E5F6G7H8I9J0K1L
cb(ESX)https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
end) https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
之后前往 es_extended - server - common.lua 文件, 同样找到下方代码AddEventHandler("esx:getSharedObject", function()https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
local Invoke = GetInvokingResource()https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
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/8I9J0K1L2M3N4O5P6Q7R
end)
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3
将其替换为:AddEventHandler('esx:getSharedObject', function(cb)https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
cb(ESX)https://pan.baidu.com/s/6H7I8J9K0L1M2N3O4P5Q
https://pan.baidu.com/s/9R0S1T2U3V4W5X6Y7Z8A?pwd=qrs5
end) https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L
https://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr
https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd
https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
|