ID:168010
 
hi my game(species,) is going well so far but i would like a enable/disable world chat verb for admins so that people cant talk if i turn it off. i have tried, i made it successfully but people who make a new char after i have disabled it can still chat.

Thanks in advance!
var/cantalk=1

mob/verb/Say(msg as text)
if(cantalk)
world<<"[msg]"

mob/verb/Say_Toggle()
if(cantalk)// Sloppy way of doing so, though. But works
cantalk=0
else cantalk=1
In response to Mysame
No, here is something much simpiler. He is refering to a Global Mute sort of thing, like I have. Try this.

var/global_mute = 0 //make this a global var, like so
GM/verb/Global_Mute()//just remember to make special GM verbs and a staff list or something of the sort.
set category = "GM"
global_mute = !global_mute//if global mute is not already active, activate it. otheriwse deactivate it.
world << INFO: "Global Mute is now [global_mute ? "Activated" : "Deactivated"]."


You must also put this into your worldsay command, like this.

mob/verb/Worldsay(T as text)
if(global_mute)
usr << "Global Mute is active."
return
else
world << "[usr] says: [T]"
In response to Pyro_dragons
Looks more stupid though XD lol jk =p