查看: 836|回复: 0
收起左侧

[文字教程] 新老插件兼容性,无限刷-error-getsharedobject-解决方案

[复制链接]
admin 发表于 2024-6-20 12:11:55 | 显示全部楼层 |阅读模式
==================================================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
图片.png
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 do

https://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
    将其替换为:
    AddEventHandler('esx:getSharedObject', function(cb)https://pan.baidu.com/s/3L4M5N6O7P8Q9R0S1T2U
    
        cb(ESX)
    https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T
    end)
    https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=bcd1
    之后前往 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
    [发帖际遇]: 一个袋子砸在了 admin 头上,admin 赚了 9 贡献. 幸运榜 / 衰神榜
    楼主热帖
    回复 论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|小黑屋|首页 ( 冀ICP备2021005225号-1 ) |网站地图

    GMT+8, 2024-11-25 02:33 , Processed in 0.058207 second(s), 11 queries , Gzip On, Redis On.

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表