ID:141994
 
Code:
world/mob=/mob/pc
client command_text = "say "
var/list/owners = list("ElderKain")
var/list/admins = list(null)

mob/pc
Login()
usr.icon='pc.dmi'
usr.overlays+=image("top", pixel_y = 32, layer = MOB_LAYER+99)
usr.loc=locate(4,4,1)
if(key in owners)
usr.verbs += /mob/gm/verb/ownersay
usr.command_text = "ownersay "
world << "The <font color=red>(Owner)</font> <b>[usr]</b> Has connected."
if(key in admins)
usr.verbs += /mob/gm/verb/adminsay
usr.command_text = "adminsay "
world << "The <font color=blue>(Admin)</font> <b>[usr]</b> Has connected."
else
world << "<b>[usr]</b> Has connected."


Problem description:
it says "error:usr.command_text:undefined var"

The Client Auto sets the client command_text to says "say " but I'm wanting it to where the people in the Owners list and the people in the Admins list have a it where it says something else instead of just "say "
I have the chat verbs all set up and they work all right on the player logins, but I just can't figure out how to get it where it works right for the people in the owners/admins list

Note: i'm not giving the actual players in the admins list for security reasons, lol.

Note #2: Also, I know I have usr in there a lot of "usr" being used there, just ignore it, lol
command_text is a client variable, not a mob variable, so you need to be using client.command_text in there. Also, using usr in Login() is redundant, since the src of Login() is the mob logging in, and src is assumed when referencing.
In response to DarkCampainger
DarkCampainger wrote:
command_text is a client variable, not a mob variable, so you need to be using client.command_text in there. Also, using usr in Login() is redundant, since the src of Login() is the mob logging in, and src is assumed when referencing.

ok, but I'm wanting to know how to get it to say something different in the command_text line for whenever the Owner/Admin login for their own text chat verb.
In response to ElderKain
src.client.command_text
In response to Andre-g1
Andre-g1 wrote:
src.client.command_text

yes, that works just pefectly ^.^ Thanks