Author Topic: problem with an admin chat.  (Read 1079 times)

i've tried this all week and none of my code i've tried is correct.

could someone write up a code to make admins names a certain color like cyan or green?  I saw this on elm's and I thought it was neat.

any help would be awesome.


see next post of mine.
« Last Edit: May 07, 2013, 06:59:37 PM by Juicebox² »

To do this, you need to rewrite the entire chat function, which will break (or be broken by) any other mods that do the same thing.

« Last Edit: May 07, 2013, 07:21:01 PM by Juicebox² »

Change if(%client.isadmin && getsubstr(%msg, 0, 1) $= "@") to this:
Code: [Select]
if(%client.isadmin && getsubstr(%chat, 0, 1) $= "@")
The variable called %msg was not defined. Also, you don't need all of those variables. Just %chat will do.

This code also has to be in a package and you need to call the parent after messageclient(%client, '', "\c1You aren't an admin."). (which also contains a syntax error)
For more on packages, please read this: https://docs.google.com/document/d/1ggzBbxAH5AXHugWPpPteb9v6dEAMDLFmrXATtl3ZwNU/edit?hl=en
« Last Edit: May 07, 2013, 07:52:18 PM by Greek2me »

OKay now, with this code I can talk but there's a @ sign behind the : sign, and i cannot talk normally outside admin chat.

http://pastebin.com/iVx8ygU5
« Last Edit: May 07, 2013, 07:37:53 PM by Juicebox² »