Everybody see /me chat command

Hello i have issue with chat, everybody see the /me here is the script

RegisterCommand('me', function(source, args, rawCommand)
    local playerName = GetPlayerName(source)
    local msg = rawCommand:sub(3)
    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(127, 0, 225, 0.6); border-radius: 3px;"><i class="fas fa-comment-dots"style="font-size:15px;color:lime"></i>&ensp;<i><b><font size="3" color="#FFFF00">{0}:</font></b></i>&ensp;<b><i><font color="lime">{1}</font></i></b></div>',
        args = { fal, msg }
    })
end, false)

Just as a tip, put your code in code blocks for maximum readability. (Start and end with three `)

The -1 argument states to send this event all players. If you meant this to be in a radius for example, you would need to find all players within a given radius of the invoking player (including themselves) and send the event individually to them, replacing -1 with their server/player id.

Hope that helps!

Just use: [Release] /me but the text is 3D printed its probably the easiest and best way for /me

And what type argument is doing the radius?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.