Nicknames / Chat Color system (+API)

Nicknames

A nickname and chat color handler

Lets you set a nickname and a chat color
Replaces default chat message handler with custom one utilizing nicknames and custom chat colors

Disclaimer

Nicknames are not automatically applied to all instances of a players name, FiveM does not supply such a feature (as of this release).
Built-in chat override does not support frameworks, such as ExtendedMode, ESX or vRP.
Nicknames and colors are not stored between sessions!

Download

Commands

Player commands

Command Description Aliases
/color [color] Changes your color (for chat etc.) None
/color_adv [r] [g] [b] Changes your color by rgb input (for chat etc.) None
/nickname [nickname] Changes your nickname /nick

Admin commands

Command Description Aliases
/setnick [id] [nickname] Sets the target players nickname None
/setcolor [id] [color] Sets the target players color None
/setcoloradv [id] [r] [g] [b] Sets the target players color None

Configuration

The resource contains two files:
blacklist.json: Contains blacklisted phrases that can not be used in nicknames. (Only used server side)
colors.json: Contains colors with names, for the /color command. (Shared with the client to generate chat suggestions)
Other elements of the resource can be configured using convars

Convars

Pro tip: This resource supports the Webadmin Settings panel and automatically adds options there

Variable Description Default value
nick_chat Replace default chat behavior with this resource’s own chat, showing nicknames and custom color in chat true
nick_chat_id Show the player’s server id in the chat (requires nick_chat to be true) true
nick_nick_everyone Anyone can use /nickname (on themselves) true
nick_color_everyone Anyone can use /color (on themselves) true
nick_unique Require unique nicknames and prevent using existing names true
nick_blacklist Scan nicknames using the blacklist file before applying true
nick_notify Send notifications in chat true

Developers

Please read the GitHub repository Readme

4 Likes

Also tagging @Blocksify since you originally requested a script like this

Thank’s dude! That’s amazing i’ll make sure to Credit you!

Thx but is there a resource.lue?

So as you posted there are admin commands but how do we ad admins?

Don’t use deprecated shit. I’d expected you to know better and use, say, chat hooks.