ID:175086
Jun 14 2003, 10:19 pm
|
|
is there anyway to list the gms in the world.. also can someone show me how to make it so it asks a gm if in the world a question?
|
Crispy covered the listing part. To make a verb like you want, I think this is how you would do it:
mob/verb/Ask_GM(t as text) for(var/mob/M in world) if(M.GM) M << "[t]" else src << "There is(are) no GM(s) in the world." That SHOULD work. Just give all your GMs a GM var. *Hates the "word" GM* Can't people say admin? Or mod at least? Airjoe |
In response to Airjoe
|
|
What that will actually do is send the message (with no information about who sent it) to all GMs, but ALSO display the message "There are no GMs in the world" once PER NON-GM PLAYER.
I'll take the liberty of fixing it up a bit... mob/verb/Ask_GM(t as text) |
<code>//If GMs have their "gm" var set to 1 mob/verb/List_GMs() src << "List of GMs:" for (var/mob/M in world) if (M.gm) src << M //If GMs have their key in a list mob/verb/List_GMs() src << "List of GMs:" for (var/mob/M in world) if (M.key in gmlist) src << M</code>
Simple for() loops.