I have noticed many servers that when someone has entered the ‘say [msg]’ commands through the console they have special names. This is a tutorial on how to do it as I have not seen one posted.
Example Images
Tutorial
Find the native chat resource, in my case it is still named ‘chat’.
Open up the sv_client.lua then Navigate to the 46th line of code right at the bottom.
Here is the default line of code:
TriggerClientEvent(‘chatMessage’, -1, (source == 0) and ‘^console’ or GetPlayerName(source), { 255, 255, 255 }, rawCommand:sub(5))
The text that is named ‘console’ is what is displayed in chat before the message when using the ‘say’ command - (commands only works in server cmd) - This is what we will change,
I will be changing my one to ‘The God’ with the color blue to match my servers theme. - Most formatting I have tried has worked as long as it is setup correctly. (Click Here for all FiveM formatting techniques)
The code should now somewhat look like this:
TriggerClientEvent(‘chatMessage’, -1, (source == 0) and ‘^4 ^_ The God ^r’ or GetPlayerName(source), { 255, 255, 255 }, rawCommand:sub(5))
I am using the color blue with an underline and the ‘^r’ cancels the formatting so it wont affect the text.
PM me or reply if you need any more help.
-Eden