搜索
查看: 12|回复: 9
收起左侧

翻译

[复制链接]

升级进度: 76%

已跑路 发表于 3 小时前 | 显示全部楼层 |阅读模式
https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
Config.ShowID = true -- Determines displaying id in chat when someone write something 这是干扰码
Config.EnableAdminTag = true -- if is true and player is admin adds "admin" tag before name

https://pan.baidu.com/s/4O5P6Q7R8S9T0U1V2W3X 不影响正文阅读


Config.EnableAdminChat = true -- if is true enables chat tab between admins
https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C

https://pan.baidu.com/s/8R0S1T2U3V4W5X6Y7Z8A
Config.EnableJobTags = true -- if is true and job_name written in Config.Tags adds job_label tag before player namehttps://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K
Config.EnableJobChats = true -- if is true enables chat tab between players that has the same job written in Config.Tagshttps://pan.baidu.com/s/1T2U3V4W5X6Y7Z8A9B0C
https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T?pwd=wxy8
Config.EnableOOCCommand = true -- if set to false players can write messages without /ooc commandhttps://pan.baidu.com/s/7I8J9K0L1M2N3O4P5Q6R
Config.EnableOOCTag = true -- if set to true adds "ooc" tag when player send a message in "all" or "ooc" channelshttps://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z
https://pan.baidu.com/s/8H9I0J1K2L3M4N5O6P7Q?pwd=nop5
Config.EnableOOCProximity = true -- (require onesync) if set to true only players near to message sender can see the message https://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z
Config.OOCProximityDist = 30.0https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K?pwd=efgh
https://pan.baidu.com/s/2L3M4N5O7P8Q9R0S1T2U
Config.EnableMECommand = truehttps://pan.baidu.com/s/8R0S1T2U3V4W5X6Y7Z8A
Config.EnableMEProximity = true -- (require onesync) if set to true only players near to message sender can see the message
https://pan.baidu.com/s/6F7G8H9I0J1K2L3M4N5O?pwd=hij3

Config.MEProximityDist = 30.0https://pan.baidu.com/s/7I8J9K0L1M2N3O4P5Q6R
https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
Config.EnableDOCommand = truehttps://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=yza0
Config.EnableDOProximity = true -- (require onesync) if set to true only players near to message sender can see the message
  • https://pan.baidu.com/s/3K4L5M6N7O8P9Q0R1S2T?pwd=opqr

  • Config.DOProximityDist = 30.0https://pan.baidu.com/s/3T4U5V6W7X8Y9Z0A1B2C?pwd=yza1

    https://pan.baidu.com/s/6W7X8Y9Z0A1B2C3D4E5F?pwd=ghi4 https://pan.baidu.com/s/5E6F7G8H9I0J1K2L3M4N?pwd=qrst


    Config.FloatMessage = 30.0 -- This Change distance for ME/DO Floating Messageshttps://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
    https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
    https://pan.baidu.com/s/2M3N4O5P6Q7R8S9T0U1V
    Config.EnableAnonymousCommand = truehttps://pan.baidu.com/s/7I8J9K0L1M2N3O4P5Q6R
    https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
    Config.EnableRPNames = false -- if set to true displays rp names https://pan.baidu.com/s/7O8P9Q0R1S2T3U4V5W6X?pwd=efgh
    https://pan.baidu.com/s/1B2C3D4E5F6G7H8I9J0K

    --[[https://pan.baidu.com/s/5V6W7X8Y9Z0A1B2C3D4E?pwd=efg3
        if Config.Framework is set to standalone you can add tags and people here with this example

    https://pan.baidu.com/s/4F5G6H7I8J9K0L1M2N3O

  • https://pan.baidu.com/s/6N7O8P9Q0R1S2T3U4V5W?pwd=abcd

  •    
  • https://pan.baidu.com/s/4M5N6O7P8Q9R0S1T2U3V?pwd=bcd0

  •     Config.Tags = {https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
            ["ballas"] = {
  • https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=yza1

  •             shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',https://pan.baidu.com/s/1R2S3T4U5V6W7X8Y9Z0A?pwd=qrst
                bg = 'rgba(0, 209, 255, 0.33)',https://pan.baidu.com/s/8Y9Z0A1B2C3D4E5F6G7H?pwd=mno6
                borderColor = '2px solid rgba(0, 209, 255, 0.37)',https://pan.baidu.com/s/6Q7R8S9T0U1V2W3X4Y5Z
                textColor = '#00D1FF',            https://pan.baidu.com/s/2T3U4V5W6X7Y8Z9A0B1C?pwd=wxy7
                label = 'BLS',     
    https://pan.baidu.com/s/9A0B1C2D3E4F5G6H7I8J?pwd=qrs4

                members = {https://pan.baidu.com/s/2J3K4L5M6N7O8P9Q0R1S?pwd=klmn
                    "license:299055de10756b9de64a546e74309416fc77059f",
    https://pan.baidu.com/s/6O7P8Q9R0S1T2U3V4W5X

                },

    https://pan.baidu.com/s/3D4E5F6G7H8I9J0K1L2M https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G


            }
    https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6

        }https://pan.baidu.com/s/9Z0A1B2C3D4E5F6G7H8I?pwd=pqr7
    https://pan.baidu.com/s/1I2J3K4L5M6N7O8P9Q0R?pwd=ghij
        if Config.Framework is set to esx or qb you need to type here job name and tag labels also you can leave members empty https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M
        (if tag key is not a job you still need to fill members table)https://pan.baidu.com/s/6X7Y8Z9A0B1C2D3E4F5G?pwd=hij1
    https://pan.baidu.com/s/8Z9A0B1C2D3E4F5G6H7I?pwd=nop3
        Config.Tags = {https://pan.baidu.com/s/7O8P9Q0R1S2T3U4V5W6X?pwd=efgh
            ["ballas"] = {            https://pan.baidu.com/s/6Q7R8S9T0U1V2W3X4Y5Z
                shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',

    https://pan.baidu.com/s/3C4D5E6F7G8H9I0J1K2L?pwd=ijkl https://pan.baidu.com/s/3U4V5W6X7Y8Z9A0B1C2D


                bg = 'rgba(0, 209, 255, 0.33)',https://pan.baidu.com/s/8I9J0K1L2M3N4O5P6Q7R
                borderColor = '2px solid rgba(0, 209, 255, 0.37)',https://pan.baidu.com/s/7G8H9I0J1K2L3M4N5O6P?pwd=klm4
                textColor = '#00D1FF',            https://pan.baidu.com/s/1A2B3C4D5E6F7G8H9I0J?pwd=abcd
                label = 'BLS',     https://pan.baidu.com/s/3N4O5P6Q7R8S9T0U1V2W
                members = {},
    https://pan.baidu.com/s/1K2L3M4N5O7P8Q9R0S1T

            },https://pan.baidu.com/s/8Q9R0S1T2U3V4W5X6Y7Z?pwd=nop4
        }https://pan.baidu.com/s/2B3C4D5E6F7G8H9I0J1K
    https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6

    https://pan.baidu.com/s/4U5V6W7X8Y9Z0A1B2C3D?pwd=bcd2
    https://pan.baidu.com/s/7Q9R0S1T2U3V4W5X6Y7Z
    https://pan.baidu.com/s/2K3L4M5N6O7P8Q9R0S1T https://pan.baidu.com/s/9I0J1K2L3M4N5O6P7Q8R?pwd=qrs6
    https://pan.baidu.com/s/1S2T3U4V5W6X7Y8Z9A0B
    https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop

    https://pan.baidu.com/s/4D5E6F7G8H9I0J1K2L3M?pwd=mnop
    回复 论坛版权

    使用道具 举报

    ChatGPT 发表于 3 小时前 | 显示全部楼层
    Config.ShowID = true -- 确定在聊天中显示ID,当有人发言时
    Config.EnableAdminTag = true -- 如果为真,且玩家是管理员,则在名字前添加“admin”标签
    Config.EnableAdminChat = true -- 如果为真,启用管理员之间的聊天标签
    
    Config.EnableJobTags = true -- 如果为真,且在Config.Tags中写入job_name,则在玩家名字前添加job_label标签
    Config.EnableJobChats = true -- 如果为真,启用拥有相同工作(在Config.Tags中写入)的玩家之间的聊天标签
    
    Config.EnableOOCCommand = true -- 如果设置为假,玩家可以在没有/ooc命令的情况下发送消息
    Config.EnableOOCTag = true -- 如果设置为真,当玩家在“all”或“ooc”频道发送消息时,添加“ooc”标签
    
    Config.EnableOOCProximity = true -- (需要onesync)如果设置为真,只有靠近消息发送者的玩家可以看到消息
    Config.OOCProximityDist = 30.0
    
    Config.EnableMECommand = true
    Config.EnableMEProximity = true -- (需要onesync)如果设置为真,只有靠近消息发送者的玩家可以看到消息
    Config.MEProximityDist = 30.0
    
    Config.EnableDOCommand = true
    Config.EnableDOProximity = true -- (需要onesync)如果设置为真,只有靠近消息发送者的玩家可以看到消息
    Config.DOProximityDist = 30.0
    
    Config.FloatMessage = 30.0 -- 此项更改ME/DO浮动消息的距离
    
    Config.EnableAnonymousCommand = true
    
    Config.EnableRPNames = false -- 如果设置为真,显示RP名字
    
    --[[
        如果Config.Framework设置为standalone,你可以在这里添加标签和人员,示例如下:
        
        Config.Tags = {
             = {
                shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
                bg = 'rgba(0, 209, 255, 0.33)',
                borderColor = '2px solid rgba(0, 209, 255, 0.37)',
                textColor = '#00D1FF',            
                label = 'BLS',     
                members = {
                    "license:299055de10756b9de64a546e74309416fc77059f",
                },
            }
        }
    
        如果Config.Framework设置为esx或qb,你需要在这里输入工作名称和标签标签,也可以将成员留空
        (如果标签键不是工作,你仍然需要填写成员表)
    
        Config.Tags = {
             = {            
                shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
                bg = 'rgba(0, 209, 255, 0.33)',
                borderColor = '2px solid rgba(0, 209, 255, 0.37)',
                textColor = '#00D1FF',            
                label = 'BLS',     
                members = {},
            },
        }
    ]]
    回复

    使用道具 举报

    升级进度: 76%

     楼主| 已跑路 发表于 3 小时前 | 显示全部楼层


    Config.Tags = {
        -- These tags automaticly handled by the script
        ["vip"] = {
            shadow = '0px 0px 11px rgba(255, 168, 0, 0.25)',
            bg = 'rgba(255, 168, 0, 0.33)',
            borderColor = '2px solid rgba(255, 168, 0, 0.37)',
            textColor = '#FFA800',
            label = 'VIP',
            members = {
                -- "1068681439446564964", Discord role id
                -- "license:299055de10756b9de64a546e74309416fc77059f"
            },
        },

        ["police"] = {
            shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
            bg = 'rgba(0, 209, 255, 0.33)',
            borderColor = '2px solid rgba(0, 209, 255, 0.37)',
            textColor = '#00D1FF',
            
            label = 'PD',
            members = {},
        },
       
        ["admin"] = {
            shadow = '0px 0px 11px rgba(255, 90, 90, 0.25)',
            bg = 'rgba(255, 90, 90, 0.33',
            borderColor = '2px solid rgba(255, 90, 90, 0.37)',
            textColor = '#FF5A5A',
            label = 'ADMIN',
            members = {},
        },

        ["mechanic"] = {
            shadow = '0px 0px 11px rgba(170, 67, 255, 0.25)',
            bg = 'rgba(170, 67, 255, 0.33)',
            borderColor = '2px solid rgba(170, 67, 255, 0.37)',
            textColor = '#AA43FF',
            label = 'LSC',        
            members = {},
        },
        ["taxi"] = {
            shadow = '0px 0px 11px rgba(255, 180, 67, 0.25)',
            bg = 'rgba(255, 180, 67, 0.33)',
            borderColor = '2px solid rgba(255, 180, 67, 0.37)',
            textColor = '#FFB443',
            label = 'TAXI',        
            members = {},
        },
        ["ooc"] = {
            shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
            bg = 'rgba(0, 209, 255, 0.33)',
            borderColor = '2px solid rgba(0, 209, 255, 0.37)',
            textColor = '#00D1FF',
            label = 'OOC',        
        },
        ["anonymous"] = {
            shadow = '0px 0px 11px rgba(0, 0, 0, 0.25)',
            bg = 'rgba(0, 0, 0, 0.33)',
            borderColor = '2px solid rgba(0, 0, 0, 0.37)',
            textColor = '#FFFFFF',
            label = 'ANON',        
        },
       
        -- To make it work these tags you need to make some edits check documentation for more detailed information
        ["twitter"] = {
            shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
            bg = 'rgba(0, 209, 255, 0.33)',
            borderColor = '2px solid rgba(0, 209, 255, 0.37)',
            textColor = '#00D1FF',
            label = 'TWT',        
        },
        ["yellowpages"] = {
            shadow = '0px 0px 11px rgba(255, 245, 0, 0.25)',
            bg = 'rgba(255, 245, 0, 0.33)',
            borderColor = '2px solid rgba(255, 245, 0, 0.37)',
            textColor = '#FFF500',
            label = 'YPAGES',        
        },
        ["do"] = {
            shadow = '0px 0px 11px rgba(255, 122, 0, 0.25)',
            bg = 'rgba(255, 122, 0, 0.33)',
            borderColor = '2px solid rgba(255, 122, 0, 0.37)',
            textColor = '#FF7A00',
            label = 'DO',   
        },
        ["me"] = {
            shadow = '0px 0px 11px rgba(255, 0, 245, 0.25)',
            bg = 'rgba(255, 0, 245, 0.33)',
            borderColor = '2px solid rgba(255, 0, 245, 0.37)',
            textColor = '#FF00F5',
            label = 'ME',        
        },
        ["server"] = {
            shadow = '0px 0px 11px rgba(0, 255, 163, 0.25)',
            bg = 'rgba(0, 255, 163, 0.33)',
            borderColor = '2px solid rgba(0, 255, 163, 0.37)',
            textColor = '#00FFA3',
            label = 'SERVER',        
        },
        ["pm"] = {
            shadow = '0px 0px 11px rgba(143, 0, 255, 0.25)',
            bg = 'rgba(143, 0, 255, 0.33)',
            borderColor = '2px solid rgba(143, 0, 255, 0.37)',
            textColor = '#8F00FF',
            label = 'PM',        
        },   
    }



    Config.EnableTypingIndicator = true -- if true enable "..." over player head when typing to chat
    Config.DotText = 'dot' -- dot or any text you want
    Config.DotScale = 0.5
    Config.DotOffset = {x = 0.33, y = 0.0, z = 0.0} -- Useful if you want to move text overhead somewhere else
    Config.Dot1Color = {r = 255, g = 255, b = 255} -- dot color when there is just one "." displaying
    Config.Dot2Color = {r = 255, g = 255, b = 255} -- dot color when there are two ".." displaying
    Config.Dot3Color = {r = 255, g = 255, b = 255} -- dot color when there are three "..." displaying
    Config.CustomDotTextColor = {r = 255, g = 255, b = 255} -- Dot color if Config.DotText is set to other than 'dot'


    回复

    使用道具 举报

    ChatGPT 发表于 3 小时前 | 显示全部楼层
    已跑路 发表于 2024-09-20 14:02
    Config.Tags = {
        -- These tags automaticly hand ...

    Config.Tags = {
        -- 这些标签由脚本自动处理
        ["vip"] = {
            shadow = '0px 0px 11px rgba(255, 168, 0, 0.25)',
            bg = 'rgba(255, 168, 0, 0.33)',
            borderColor = '2px solid rgba(255, 168, 0, 0.37)',
            textColor = '#FFA800',
            label = 'VIP',
            members = {
                -- "1068681439446564964", Discord角色ID
                -- "license:299055de10756b9de64a546e74309416fc77059f"
            }, 
        },
    
        ["police"] = {
            shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
            bg = 'rgba(0, 209, 255, 0.33)',
            borderColor = '2px solid rgba(0, 209, 255, 0.37)',
            textColor = '#00D1FF',
            label = 'PD',
            members = {}, 
        },
        
        ["admin"] = {
            shadow = '0px 0px 11px rgba(255, 90, 90, 0.25)',
            bg = 'rgba(255, 90, 90, 0.33)',
            borderColor = '2px solid rgba(255, 90, 90, 0.37)',
            textColor = '#FF5A5A',
            label = 'ADMIN',
            members = {}, 
        },
    
        ["mechanic"] = {
            shadow = '0px 0px 11px rgba(170, 67, 255, 0.25)',
            bg = 'rgba(170, 67, 255, 0.33)',
            borderColor = '2px solid rgba(170, 67, 255, 0.37)',
            textColor = '#AA43FF',
            label = 'LSC',        
            members = {}, 
        },
        ["taxi"] = {
            shadow = '0px 0px 11px rgba(255, 180, 67, 0.25)',
            bg = 'rgba(255, 180, 67, 0.33)',
            borderColor = '2px solid rgba(255, 180, 67, 0.37)',
            textColor = '#FFB443',
            label = 'TAXI',        
            members = {}, 
        },
        ["ooc"] = {
            shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
            bg = 'rgba(0, 209, 255, 0.33)',
            borderColor = '2px solid rgba(0, 209, 255, 0.37)',
            textColor = '#00D1FF',
            label = 'OOC',        
        },
        ["anonymous"] = {
            shadow = '0px 0px 11px rgba(0, 0, 0, 0.25)',
            bg = 'rgba(0, 0, 0, 0.33)',
            borderColor = '2px solid rgba(0, 0, 0, 0.37)',
            textColor = '#FFFFFF',
            label = 'ANON',        
        },
        
        -- 要使这些标签生效,您需要进行一些编辑,请查看文档以获取更详细的信息
        ["twitter"] = {
            shadow = '0px 0px 11px rgba(0, 209, 255, 0.25)',
            bg = 'rgba(0, 209, 255, 0.33)',
            borderColor = '2px solid rgba(0, 209, 255, 0.37)',
            textColor = '#00D1FF',
            label = 'TWT',        
        },
        ["yellowpages"] = {
            shadow = '0px 0px 11px rgba(255, 245, 0, 0.25)',
            bg = 'rgba(255, 245, 0, 0.33)',
            borderColor = '2px solid rgba(255, 245, 0, 0.37)',
            textColor = '#FFF500',
            label = 'YPAGES',        
        },
        ["do"] = {
            shadow = '0px 0px 11px rgba(255, 122, 0, 0.25)',
            bg = 'rgba(255, 122, 0, 0.33)',
            borderColor = '2px solid rgba(255, 122, 0, 0.37)',
            textColor = '#FF7A00',
            label = 'DO',   
        },
        ["me"] = {
            shadow = '0px 0px 11px rgba(255, 0, 245, 0.25)',
            bg = 'rgba(255, 0, 245, 0.33)',
            borderColor = '2px solid rgba(255, 0, 245, 0.37)',
            textColor = '#FF00F5',
            label = 'ME',        
        },
        ["server"] = {
            shadow = '0px 0px 11px rgba(0, 255, 163, 0.25)',
            bg = 'rgba(0, 255, 163, 0.33)',
            borderColor = '2px solid rgba(0, 255, 163, 0.37)',
            textColor = '#00FFA3',
            label = 'SERVER',        
        },
        ["pm"] = {
            shadow = '0px 0px 11px rgba(143, 0, 255, 0.25)',
            bg = 'rgba(143, 0, 255, 0.33)',
            borderColor = '2px solid rgba(143, 0, 255, 0.37)',
            textColor = '#8F00FF',
            label = 'PM',        
        },    
    }
    
    Config.EnableTypingIndicator = true -- 如果为真,则在玩家头上启用“...”指示器
    Config.DotText = 'dot' -- 点或您想要的任何文本
    Config.DotScale = 0.5
    Config.DotOffset = {x = 0.33, y = 0.0, z = 0.0} -- 如果您想将文本移动到其他地方,这很有用
    Config.Dot1Color = {r = 255, g = 255, b = 255} -- 当只显示一个“.”时的点颜色
    Config.Dot2Color = {r = 255, g = 255, b = 255} -- 当显示两个“..”时的点颜色
    Config.Dot3Color = {r = 255, g = 255, b = 255} -- 当显示三个“...”时的点颜色
    Config.CustomDotTextColor = {r = 255, g = 255, b = 255} -- 如果Config.DotText设置为其他文本,则为点的颜色
    回复

    使用道具 举报

    升级进度: 76%

     楼主| 已跑路 发表于 3 小时前 | 显示全部楼层


    --[[
        if Config.Framework is set to standalone you need to fill here with admins' Rockstar License IDs
       
        -EXAMPLE
        Config.Admins = {
            "license:299055de10756b9de64a546e74309416fc77059f"
        }

        if Config.Framework is set to esx or qb you need to type here permissions
       
        -EXAMPLE   
        Config.Admins = {
            "god",
            "admin",
            "mod",
        }



    回复

    使用道具 举报

    ChatGPT 发表于 3 小时前 | 显示全部楼层
    已跑路 发表于 2024-09-20 14:05
    --[[
        if Config.Framework is set to standalone  ...


    --[[
        如果Config.Framework设置为独立,您需要在此处填写管理员的Rockstar许可证ID
       
        -示例
        Config.Admins = {
            "license:299055de10756b9de64a546e74309416fc77059f"
        }

        如果Config.Framework设置为esx或qb,您需要在此处输入权限
       
        -示例   
        Config.Admins = {
            "god",
            "admin",
            "mod",
        }
    ]]
    回复

    使用道具 举报

    升级进度: 76%

     楼主| 已跑路 发表于 3 小时前 | 显示全部楼层
    ChatGPT 发表于 2024-9-20 14:05
    --[[
        如果Config.Framework设置为独立,您需要在此处填写管理员的Rockstar许可证ID
       


    function GetCore()
        local object = nil
        local Framework = Config.Framework

        if Config.Framework == "oldesx" then
            local counter = 0
            while not object  do
                TriggerEvent('esx:getSharedObject', function(obj) object = obj end)
                counter = counter + 1
                if counter == 3 then
                    break
                end
                Citizen.Wait(1000)
            end
            if not object then
                print("mChat::Framework is not selected in the config correctly if you're sure it's correct please check your events to get framework object")
            end
        end
       
        if Config.Framework == "newesx" then
            local counter = 0
            local status = pcall(function ()
                exports['es_extended']:getSharedObject()
            end)
            if status then        
                while not object do
                    object = exports['es_extended']:getSharedObject()
                    counter = counter + 1
                    if counter == 3 then
                        break
                    end
                    Citizen.Wait(1000)
                end
            end
            if not object then
                print("mChat::Framework is not selected in the config correctly if you're sure it's correct please check your events to get framework object")
            end
        end

        if Config.Framework == "newqb" then
            local counter = 0
            local status = pcall(function ()
                exports["qb-core"]:GetCoreObject()
            end)
            if status then
                while not object  do
                    object = exports["qb-core"]:GetCoreObject()
                    counter = counter + 1
                    if counter == 3 then
                        break
                    end
                    Citizen.Wait(1000)
                end
            end
            if not object then
                print("mChat::Framework is not selected in the config correctly if you're sure it's correct please check your events to get framework object")
            end
        end

        if Config.Framework == "oldqb" then
            local counter = 0

            while  not object do
                counter = counter + 1
                TriggerEvent('QBCore:GetObject', function(obj) object = obj end)
                if counter == 3 then
                    break
                end
                Citizen.Wait(1000)
            end
            if not object then
                print("mChat::Framework is not selected in the config correctly if you're sure it's correct please check your events to get framework object")
            end
        end

        if Config.Framework == 'autodetect' then
            local counter = 0
            local breakLoop = false
            Citizen.CreateThread(function()
                while not object do
                    counter = counter + 1
                    if counter == 3 then
                        breakLoop = true
                        counter = 0
                    end
                    Citizen.Wait(700)
                end
            end)


            while not object do
                local status = pcall(function ()
                    object = exports['es_extended']:getSharedObject()
                end)
                Citizen.Wait(1000)
                break
            end

            if object and Framework == 'autodetect' then
                Framework = 'newesx'
            end

            while not object do
                TriggerEvent('esx:getSharedObject', function(obj) object = obj end)
                if breakLoop then
                    break
                end
                Citizen.Wait(1000)
            end

            if object and Framework == 'autodetect' then
                Framework = 'oldesx'
            end

            while not object do
                local status = pcall(function ()
                    object = exports["qb-core"]:GetCoreObject()
                end)
                Citizen.Wait(1000)
                break
            end

            if object and Framework == 'autodetect' then
                Framework = 'newqb'
            end

            while not object do
                TriggerEvent('QBCore:GetObject', function(obj) object = obj end)
                if breakLoop then
                    break
                end
                Citizen.Wait(1000)
            end

            if object and Framework == 'autodetect' then
                Framework = 'oldqb'
            end

            if not object then
                print("mChat::Framework object couldn't find. Setting chat to standalone")
                Framework = 'standalone'
            else
                print("mChat::Framework object found : ", Framework)
            end
        end
        if object == nil then
            return {}, Framework
        else
            return object, Framework
        end
    end


    回复

    使用道具 举报

    ChatGPT 发表于 3 小时前 | 显示全部楼层
    已跑路 发表于 2024-09-20 14:07
    function GetCore()
        local object = nil
        loca ...

    function GetCore()
        local object = nil
        local Framework = Config.Framework
    
        if Config.Framework == "oldesx" then
            local counter = 0
            while not object do
                TriggerEvent('esx:getSharedObject', function(obj) object = obj end)
                counter = counter + 1
                if counter == 3 then
                    break
                end
                Citizen.Wait(1000)
            end
            if not object then
                print("mChat::Framework在配置中未正确选择,如果您确定它是正确的,请检查您的事件以获取框架对象")
            end
        end
        
        if Config.Framework == "newesx" then
            local counter = 0
            local status = pcall(function ()
                exports['es_extended']:getSharedObject()
            end)
            if status then        
                while not object do
                    object = exports['es_extended']:getSharedObject()
                    counter = counter + 1
                    if counter == 3 then
                        break
                    end
                    Citizen.Wait(1000)
                end
            end
            if not object then
                print("mChat::Framework在配置中未正确选择,如果您确定它是正确的,请检查您的事件以获取框架对象")
            end
        end
    
        if Config.Framework == "newqb" then
            local counter = 0
            local status = pcall(function ()
                exports["qb-core"]:GetCoreObject()
            end)
            if status then
                while not object do
                    object = exports["qb-core"]:GetCoreObject()
                    counter = counter + 1
                    if counter == 3 then
                        break
                    end
                    Citizen.Wait(1000)
                end
            end
            if not object then
                print("mChat::Framework在配置中未正确选择,如果您确定它是正确的,请检查您的事件以获取框架对象")
            end
        end
    
        if Config.Framework == "oldqb" then
            local counter = 0
    
            while not object do
                counter = counter + 1
                TriggerEvent('QBCore:GetObject', function(obj) object = obj end)
                if counter == 3 then
                    break
                end
                Citizen.Wait(1000)
            end
            if not object then
                print("mChat::Framework在配置中未正确选择,如果您确定它是正确的,请检查您的事件以获取框架对象")
            end
        end
    
        if Config.Framework == 'autodetect' then
            local counter = 0
            local breakLoop = false
            Citizen.CreateThread(function()
                while not object do
                    counter = counter + 1
                    if counter == 3 then
                        breakLoop = true
                        counter = 0
                    end
                    Citizen.Wait(700)
                end
            end)
    
            while not object do
                local status = pcall(function ()
                    object = exports['es_extended']:getSharedObject()
                end)
                Citizen.Wait(1000)
                break
            end
    
            if object and Framework == 'autodetect' then
                Framework = 'newesx'
            end
    
            while not object do
                TriggerEvent('esx:getSharedObject', function(obj) object = obj end)
                if breakLoop then
                    break
                end
                Citizen.Wait(1000)
            end
    
            if object and Framework == 'autodetect' then
                Framework = 'oldesx'
            end
    
            while not object do
                local status = pcall(function ()
                    object = exports["qb-core"]:GetCoreObject()
                end)
                Citizen.Wait(1000)
                break
            end
    
            if object and Framework == 'autodetect' then
                Framework = 'newqb'
            end
    
            while not object do
                TriggerEvent('QBCore:GetObject', function(obj) object = obj end)
                if breakLoop then
                    break
                end
                Citizen.Wait(1000)
            end
    
            if object and Framework == 'autodetect' then
                Framework = 'oldqb'
            end
    
            if not object then
                print("mChat::未能找到框架对象。将聊天设置为独立模式")
                Framework = 'standalone'
            else
                print("mChat::找到框架对象 : ", Framework)
            end
        end
        if object == nil then
            return {}, Framework
        else
            return object, Framework
        end
    end

    这段代码的功能是获取游戏框架的对象,支持多种框架(如ESX和QB),并在未能获取对象时提供相应的错误信息。
    回复

    使用道具 举报

    升级进度: 76%

     楼主| 已跑路 发表于 3 小时前 | 显示全部楼层
    ChatGPT 发表于 2024-9-20 14:07
    这段代码的功能是获取游戏框架的对象,支持多种框架(如ESX和QB),并在未能获取对象时提供相应的错误 ...


    Config = {}
    Config.Framework = 'NEWESX' -- newesx, oldesx, newqb, oldqb, standalone, autodetect
    Config.ChatOpenKey = 245 --https://docs.fivem.net/docs/game-references/controls/
    Config.ShowJoins = true -- If set to false chat will not display who is joined the server.
    Config.ShowQuits = true -- If set to false chat will not display who is quited from the server.
    Config.BlacklistedWords = {
        "cunt",
        "pig",
        "fuck",
    }



    回复

    使用道具 举报

    ChatGPT 发表于 3 小时前 | 显示全部楼层
    已跑路 发表于 2024-09-20 14:09
    Config = {}
    Config.Framework = 'NEWESX' -- newesx, ...


    Config = {}
    Config.Framework = 'NEWESX' -- newesx, oldesx, newqb, oldqb, standalone, autodetect
    Config.ChatOpenKey = 245 -- https://docs.fivem.net/docs/game-references/controls/
    Config.ShowJoins = true -- 如果设置为假,聊天将不显示谁加入了服务器。
    Config.ShowQuits = true -- 如果设置为假,聊天将不显示谁退出了服务器。
    Config.BlacklistedWords = {
        "cunt",
        "pig",
        "fuck",
    }

    这段代码是配置文件的一部分,定义了聊天系统的基本设置,包括框架类型、打开聊天的按键、是否显示玩家的加入和退出信息,以及一个包含被禁止词汇的列表。
    回复

    使用道具 举报

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

    本版积分规则

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

    GMT+8, 2024-9-20 17:23 , Processed in 0.072060 second(s), 9 queries , Redis On.

    Powered by Discuz! X3.4

    © 2001-2013 ELITE论坛【技术无价-分享快乐】

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