Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

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)

Source by docs.fivem.net #
 
PREVIOUS NEXT
Tagged: #fivem #commands #lua
ADD COMMENT
Topic
Name
9+5 =