Ok, I defined the var 'muted = 0', and I made an admin command to mute people, but my say command if doesn't seem to work!
mob
verb
say(t as text, mob/M)
set category = "social"
if(M.muted = 0)
world << "[usr]: [html_encode(t)]"
else
usr << "You are muted from speaking"
ID:267482
May 22 2003, 2:15 am
|
|
May 22 2003, 2:17 am
|
|
if(muted=<font color=blue>=</font>) with one it sets it to 0.
|
Dragon of Ice wrote:
Ok, I defined the var 'muted = 0', and I made an admin command to mute people, but my say command if doesn't seem to work! You don't need the M argument at all; take that out completely. What you should be checking for the muted var is usr, not M. So it'd look correctly like this: if(!usr.muted) It helps when you post code on the forums if you use <DM> tags around it, which will make the HTML show up as tags, not as actual colored text. Lummox JR |
In response to Lummox JR
|
|
Thanks, and I will use the
tags next time, didn't know about them!
|
Ok, new problem... I the mute command for GM's mutes the GM!
mob Mabe if I use the double ==? I'll have to try that! |
In response to Dragon of Ice
|
|
nope...doesn't work...
|
In response to Dragon of Ice
|
|
Dragon of Ice wrote:
Ok, new problem... I the mute command for GM's mutes the GM! > mob Try this: mobGM verb shut(mob/M in world) M.muted = 1 |
In response to Cra Zee Coder
|
|
Yes, I figured that out...I just didn't cancel the post...sorry, and it only works as (mob/M as mob in world), I beleive...
|
In response to Dragon of Ice
|
|
It should work as just mob/M in world.
|
In response to Cra Zee Coder
|
|
Dragon has tried and is more advanced in coding than you. If he has tested it out and it works, don't bother him Cra Zee:P
|
In response to Starwarspower
|
|
Fine. I was just saying mob/M iin world works too.
|