[HELP] Anonymous chatting

I would like to know how to make an anonymous chat via the F8 console in-game. What I mean is you say something like “say ^1Anonymous^7: Drugs are at the motel in sandy not harmony” but doing it this way just makes a normal text chat and still says my name before what I type just not including “say.” The usage of this is so I can extend RP without having to make a actual command in server resources etc. I do know this is possible and been trying to find out how to do it.

You can take example here:

Thanks for the help, but not what im looking for! Im looking for a way for me to make my own advert kind of things client side. So I could also do like Ammunation and all that. I know my request is big

My script is used with chat but it disguises names so there will be no meta-gaming. It should do what you want it to

Im looking for a client side way to do it

AddEventHandler('chatMessage', function(name, source, msg)
    sm = stringsplit(msg, " ");
	if sm[1] == "/ano" then
	    CancelEvent()
        TriggerClientEvent('chatMessage', -1, "Twitter | ^1*anon*^0", { 66, 244, 146 }, string.sub(msg,5))
	end
end)

function stringsplit(inputstr, sep)
	if sep == nil then
		sep = "%s"
	end
	local t={} ; i=1
	for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
		t[i] = str
		i = i + 1
	end
	return t
end

Here is a server sided version, put it in a server.lua

I just said a completely client side way to do it, so I can do it on any server even if they don’t have a script for it

Are you trying to exploit lol

Lmao a complete client side? Then change your name to anonymous or more like ^1*anon*^0

No other way as you are using their chat system

If its client side then how will anyone else see it lmao. Accept the help we are giving you because you dont seem to know anything about it lmao

Please, please, please, please, please, please stop using chatMessage to check if your message contains a command. Instead, use RegisterCommand().

RegisterCommand('ano', function(source, args)
    TriggerClientEvent('chatMessage', -1, "Twitter | ^1*anon*^0", {66, 244, 146}, table.concat(args, " "))
end, false)
1 Like

this no work