Answers for "create module fivem lua"

Lua
0

fivem commands lua example

RegisterCommand('car', function(source, args)
    -- TODO: make a vehicle! fun!
    TriggerEvent('chat:addMessage', {
        args = { 'I wish I could spawn this ' .. (args[1] or 'adder') .. ' but my owner was too lazy. :(' }
    })
end, false)
Posted by: Guest on August-15-2021
0

fivem commands example lua

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)
Posted by: Guest on August-15-2021

Browse Popular Code Answers by Language