Chat Tag Help

I have this for my chat tag system:
local filename = “chatranks.lua”

if SERVER then
AddCSLuaFile( “autorun/” … filename )

local function ChatTags( Ply, Txt, ply )
	local Msg = {}

	-- Console?
	if IsValid( Ply ) then 
		if Ply:IsUserGroup("owner") then
			Msg[#Msg+1] = Color(255,0,0)
			Msg[#Msg+1] = "(Owner) "

                    Msg[#Msg+1] = "(" .. Ply:GetRank() .. ") "
		Msg[#Msg+1] = team.GetColor( Ply:Team() )
		Msg[#Msg+1] = Ply:Nick()
	-- The message
	Msg[#Msg+1] = Color(255,255,255)
	Msg[#Msg+1] = ": " .. Txt
	chat.AddText( unpack(Msg) )
	return true
hook.Add("OnPlayerChat","Simple chat tags",ChatTags)


Now my question here is I want to add something like:
if Ply:SteamID(“STEAM_0:0:00000000”) then
Msg[#Msg+1] = Color(255,0,0)
Msg[#Msg+1] = “(HIS CHAT TAG)”

But when I do that it adds the above tag to everyone, even though I specified his Steam ID.
Can someone give me some pointers on what I’m doing wrong?

Also I also tried the: Player:SteamID64() but that doesn’t work either.

Thanks for the help :slight_smile:

Player:SteamID returns the players SteamID and

Player:SteamID64 return the players SteamID64. So what you’re doing isn’t ever going to work, try something like the following:

if Ply:SteamID() == "STEAM_0:0:00000000" || Ply:SteamID64() == "steamid64 goes here"  then
	Msg[#Msg+1] = Color( 255, 0, 0 )
	Msg[#Msg+1] = "( HIS CHAT TAG )"

Ill try it and post results :slight_smile: Thanks

[editline]12th May 2016[/editline]

Everything works :slight_smile: