/tweet disable. But people need to get a message!

Hello,

I want to disable this command /tweet. But when someone type this command he needs to get a message with: /tweet is disabled use your phone

only i dont know how to make that only people that type this command can see the message

RegisterCommand('tweet', function(source, args, rawCommand)
    local playerName = GetPlayerName(source)
    local msg = rawCommand:sub(6)
    local name = getIdentity(source)
    fal = name.firstname .. " " .. name.lastname
    TriggerClientEvent('chat:addMessage', -1, {
        template = '<div style="padding: 0.5vw; margin: 0.5vw; background-color: rgba(28, 160, 242, 0.6); border-radius: 3px;"><i class="fab fa-twitter"></i> @{0}: {1}</div>',
        args = { fal, msg }
    })
end, false)

In your TriggerClientEvent instead of -1 enter source, -1 means you are sending it to every client connected

Oke damn thanks really easy xD

1 Like