[Release][EssentialMode] Me command, Do command and Private Messaging

Hi, thanks for your script, I had a question. I’m trying to do the private messaging through a chatbox. Like you have to press a button to open the citizen menu and you can send a text to someone, there is a chatbox to put the ID of the guy and a chatbox to put the message. But I can’t make it work, could you help me please ?

Thanks :slight_smile:

Any chance you can update these for FX servers? :slight_smile:

4 Likes

This one seems to work with fxserver

-- ME COMMAND (/me [Message]) Outcomes: Name Message (All in purple)
TriggerEvent('es:addCommand', 'me', function(source, args, user)
    table.remove(args, 1)
    TriggerClientEvent('chatMessage', -1, "", {255, 0, 0}, " ^6 " .. GetPlayerName(source) .."  ".."^6  " .. table.concat(args, " "))
end)

is there anyway to make the ./me command work w/o es because I love how it has no colon

just use the console as a log, or I have it setup use a webhook with discord so I can see anything and everything that is typed into chat.

FiveM uses something called CFXLua. If you want to learn proper Lua, google it or go to lua.org.

i assume essentialmode is needed


help dont work the private message

you try it with /pm (id) (message)