• Rank Chat Tags for DarkRP
    34 replies, posted
Please do not do this anymore. Avoid editing core DarkRP files. Make sure it is up-to-date and use this hook: (note that the following uses FAdmin, let me know if you use another admin mod like ULX instead) [LUA] local userGroups = { superadmin = true, admin = true } hook.Add("OnPlayerChat", "chat thing", function(ply, text, teamOnly, alive, prefixText, color1, color2) if userGroups[string.lower(ply:GetNWString("usergroup"))] then chat.AddText(Color(255, 0, 0, 255), "[" .. ply:GetNWString("usergroup") .. "] ", color1, ply:Nick(), color2, ": "..text) return true end end) [/LUA]
[QUOTE=Bo98;41003894]Please do not do this anymore. Avoid editing core DarkRP files. Make sure it is up-to-date and use this hook: (note that the following uses FAdmin, let me know if you use another admin mod like ULX instead) [LUA] local userGroups = { superadmin = true, admin = true } hook.Add("OnPlayerChat", "chat thing", function(ply, text, teamOnly, alive, prefixText, color1, color2) if userGroups[string.lower(ply:GetNWString("usergroup"))] then chat.AddText(Color(255, 0, 0, 255), "[" .. ply:GetNWString("usergroup") .. "] ", color1, ply:Nick(), color2, ": "..text) return true end end) [/LUA][/QUOTE] It's nice to see DarkRP getting some flexibility.
[QUOTE=Bo98;41003894]Please do not do this anymore. Avoid editing core DarkRP files. Make sure it is up-to-date and use this hook: (note that the following uses FAdmin, let me know if you use another admin mod like ULX instead) [LUA] local userGroups = { superadmin = true, admin = true } hook.Add("OnPlayerChat", "chat thing", function(ply, text, teamOnly, alive, prefixText, color1, color2) if userGroups[string.lower(ply:GetNWString("usergroup"))] then chat.AddText(Color(255, 0, 0, 255), "[" .. ply:GetNWString("usergroup") .. "] ", color1, ply:Nick(), color2, ": "..text) return true end end) [/LUA][/QUOTE] I use ULX. Thank you
[LUA] local userGroups = { superadmin = true, admin = true } hook.Add("OnPlayerChat", "chat thing", function(ply, text, teamOnly, alive, prefixText, color1, color2) if userGroups[string.lower(ply:GetUserGroup())] then chat.AddText(Color(255, 0, 0, 255), "[" .. ply:GetUserGroup() .. "] ", color1, ply:Nick(), color2, ": "..text) return true end end) [/LUA]
-Snip- Figured it out.
Sorry, you need to Log In to post a reply to this thread.