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 = {},
},
}
]] 已跑路 发表于 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设置为其他文本,则为点的颜色 已跑路 发表于 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",
}
]] 已跑路 发表于 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),并在未能获取对象时提供相应的错误信息。 已跑路 发表于 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",
}
这段代码是配置文件的一部分,定义了聊天系统的基本设置,包括框架类型、打开聊天的按键、是否显示玩家的加入和退出信息,以及一个包含被禁止词汇的列表。
页:
[1]