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

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

[复制链接]
admin 发表于 2024-6-20 12:11:55 | 显示全部楼层 |阅读模式
==================================================
  • 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
    图片.png 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.lua
  • https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B

  • 找到
    ESX = nil
    https://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.lua
  • https://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
    [发帖际遇]: 一个袋子砸在了 admin 头上,admin 赚了 9 贡献. 幸运榜 / 衰神榜
    楼主热帖
    回复 论坛版权

    使用道具 举报

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

    本版积分规则

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

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

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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