📜  Fivem 命令示例 lua 代码示例

📅  最后修改于: 2022-03-11 14:54:53.927000             🧑  作者: Mango

代码示例1
Citizen.CreateThread(function() TriggerEvent('chat:addSuggestion', '/test', 'Testing this new command.') end)
RegisterCommand("test", function(source, args, rawCommandString)
    -- Colors can be found here: https://zap-hosting.com/guides/docs/en/fivem_servername_color/
    TriggerEvent('chatMessage', "^2TEST", { 255, 0, 62 }, "Testing this new command.")
end, false)