ID:157649
 
Hey I was wondering how I would change change ooc chat colors for specific player groups (IE: Admins, gms, etc) in Space Station 13?
you are talking of something about this:
mob/verb/OOC(ooc as text)
if(usr.admin==1)
world<<"<font color = green><b>[usr]: [ooc]"
return

if(usr.GM==1)
world<<"<font color = red><b>[usr]: [ooc]"
return


If its not that give more description.
In response to Gohan Games
Yes I believe that's it, it used to be in an old version on SS13, when you ooc you would have a tag next to your name IE [H] for host, and your chat would be a different color than others if you were an admin, I need code to change all user groups. I think that was it, or is on the right track..where would that code go?
var/list/admin[]//List of admins
mob/verb/OOC(message as text)
if(message)//If the message exist, so that players can't leave blank messages.
if(src==world.host)//If the player is the host.
world<<"<span class=host>[src]: [html_encode(copytext(message,1,255))]</span>"
else if(src in admin)//If the player is an admin.
world<<"<span class=admin>[src]: [html_encode(copytext(message,1,255))]</span>"
else//If the player is neither.
world<<"<span class=player>[src]: [html_encode(copytext(message,1,255))]</span>"
/*The html_encode procedure will prevent players from changing their font color, copytext
will prevent massive messages. Span is a tag used to classify the text for changing later.
*/



//Everything below this put in a script file, or in your output's script.
.host{color:red;}
.admin{color:blue;}
.player{color:green;}
In response to Ulterior Motives
Where does this go? :| I'm a huge idiot at scripting.
In response to Mald
Code:Color ooc for host
/mob/verb/ooc(msg as text)
if(src.rank == "Host")
src << "<span class='ooc_title' font color='red'><b>HOST:[src.key]:</span> <span class_'ooc_text' font color='red'> [msg]</span> "


Problem description:Undefined variable src.rank

Yes I know I will probably get replies saying I'm an idiot for not being able to figure it out, but I cannot figure it out and would love some help..
In response to Mald
So, is your rank a define variable under mob?

Like, mob/var/rank?
In response to HolyDoomKnight
The src.rank works under a different file, admin.dm for all the admin commands, I just assumed I could use it to make an admin chat color.
EDIT:
 if (admins.Find(src.ckey))
src.holder = new /obj/admins(src)
src.holder.rank = admins[src.ckey]
switch (admins[src.ckey])

is that it? it's under mob. and under that is all the ranks..
It would seem that what you want is to hire somebody to alter a system for you, instead of spamming the forum, seeking advice that you do not understand, as you're completely lacking the basics.