Ok so I tryed I found ulx tags and tryed them out but when I use them and make a group in the code it comes out as admin?
[CODE]-- v5
-- for yellowish white = 238, 221, 130
if (SERVER) then
AddCSLuaFile( "chat.lua" )
local Tag = ""
local R = 0
local G = 0
local B = 0
function CustomChat_ChatMessage( name, String, bool, R, G, B) -- ChatMessage(rgb, name, rgb2, String)
umsg.Start( "CustomChat_ChatMsg" )
umsg.String(name)
umsg.String(String)
umsg.String(bool)
umsg.Long(R)
umsg.Long(G)
umsg.Long(B)
umsg.End()
end
concommand.Add( "chat_alert", function( ply, cmd, args )
if args[1] then // We're seeing if there are any arguments, arguments are stored on a table, so you will have to use args[index].
if ply:IsAdmin() then
CustomChat_ChatMessage( "ALERT", "> "..string.gsub(args[1], "_", " "), "" , 255, 0, 0)
else
ply:PrintMessage(HUD_PRINTCONSOLE,"You are not Admin")
Msg("--Player "..ply:Nick().." is not admin and tryed to use alert chat.\n")
end
end
end )
function CustomChat_Checker( ply, text, teamonly )
--/*
if ply:IsUserGroup("MOD") then
Tag = "[Mod]"
R = 0
G = 255
B = 0
elseif ply:IsVIP() then
Tag = "[Vip]"
R = 255
G = 255
B = 0
elseif ply:IsSuperAdmin() then
Tag = "[SuperAdmin]"
R = 255
G = 0
B = 0
elseif ply:IsAdmin() then
Tag = "[Admin]"
R = 0
G = 255
B = 255
elseif ply:IsUserGroup("Owner") then
Tag= "[Owner]"
R = 255
G = 0
B = 255
elseif ply:IsUserGroup("M-VIP") then
Tag = "[MVip]"
R = 189
G = 15
B = 255
elseif ply:IsUserGroup("T-VIP") then
Tag = "[TVip]"
R = 77
G = 83
B = 85
end
--*/
/*
if ply:IsSuperAdmin() then
Tag = "[Admin]"
R = 255
G = 0
B = 0
elseif ply:IsAdmin() then
Tag = "[Mod]"
R = 0
G = 206
B = 209
elseif ply:IsUserGroup("vip") then
Tag = "[Vip]"
R = 0
G = 0
B = 255
else
Tag = "[User]"
R = 238
G = 221
B = 130
end
*/
CustomChat_ChatMessage(ply:Nick(), "> "..text, Tag, R, G, B)
return ""
end
hook.Add("PlayerSay", "WordCheck", CustomChat_Checker)
------------------------------------------
else --- client code --
------------------------------------------
usermessage.Hook("CustomChat_ChatMsg", function( um, ply )
local name = um:ReadString()
local String = um:ReadString()
local Tag = um:ReadString()
local R = um:ReadLong()
local G = um:ReadLong()
local B = um:ReadLong()
chat.AddText(Color(R, G, B, 255), Tag..name, Color(255, 255, 255, 255), String)
end)
end-- final end
-- Admin > flamedog: words
-- SAdmin > flamedog: words
-- Console > words[/CODE]
So ya when I try to put a player in a group it comes out as admin Please help
[editline]25th June 2013[/editline]
Btw this is for ttt
[editline]25th June 2013[/editline]
elseif ply:IsVIP() then
Tag = "[Vip]"
R = 255
G = 255
B = 0
Also fixed that to IsUserGroup("VIP")
Here is a picture
[IMG]http://i43.tinypic.com/2ngeclh.png[/IMG]
[highlight](User was banned for this post ("wrong section" - postal))[/highlight]