Chat Tags For Admins

I Want to add chat tags for admins

[ADMIN]DaRkWoRlD: 1234

I want to learn lua :eng101:

Use this: obviously with a hook

This should work:
function RankBeforeChat( player, strText, bTeamOnly, bPlayerIsDead )
chat.AddText( “[”…player:GetNWString(“usergroup”)…"]",player, Color( 255, 255, 255 ), ": ", strText )
return true
hook.Add(“OnPlayerChat”, “RankBeforeChat”, RankBeforeChat)


Where do I put this code in? I put it in garrysmod -> lua -> autorun -> server
And it’s not wroking…

It’s a client side hook, so guess where you need to place it.

its clientside :smiley:
place in