可以直接购买下面插件解决
聊天窗口
https://www.gtagm.cn/forum.php?mod=viewthread&tid=762&fromuid=1
(出处: FiveM技术教程分享)
也可以修改下面目录的sv_chat.lua文件
resources\[gameplay]\chat\sv_chat.lua
在文件底部加入如下命令即可-- player join messages
AddEventHandler('chat:init', function()
TriggerClientEvent('chatMessage', -1, '', { 255, 255, 255 }, '^2* ' .. GetPlayerName(source) .. ' 进入游戏')
end)
AddEventHandler('playerDropped', function(reason)
TriggerClientEvent('chatMessage', -1, '', { 255, 255, 255 }, '^2* ' .. GetPlayerName(source) ..' 离开游戏 (' .. reason .. ')')
end)
RegisterCommand('say', function(source, args, rawCommand)
TriggerClientEvent('chatMessage', -1, (source == 0) and '^1通知' or GetPlayerName(source), { 255, 255, 255 }, rawCommand:sub(5))
end)
|