ID:266339
![]() Jan 9 2002, 2:14 pm
|
|
I need a Who Command code if you know one Tell me!Thanks!
|
![]() Jan 9 2002, 2:17 pm
|
|
Try looking in the Guide.
|
SSJ4_Gohan_Majin wrote:
<font color=Red>i can't find it there Well what would the steps be for a who command? This is a good place to put on the thinking cap, because this is about the easiest programming problem you'll ever need to solve! |
SSJ4_Gohan_Majin wrote:
<font color=Red>i can't find it there Did you actually ever click on the link to your left that says "Guide?" If so, did you actually look at the page that opened? I took another look to make sure it's still in there, like the last 35 times someone declared it wasn't on these very forums. Guess what? It's still there. Took me about four seconds to find it. Not sure why people give up so easily... |
Foomer wrote:
They're lazy. It's a common trait among people that age. The irony is that I'm lazy too... and that's exactly why I prefer to look it up. Much easier than typing up a question and waiting for a reply. |
Well, I guess there are two kinds of lazyiness. The kind of laziness that takes the shortest route, and the kind that's too lazy to think about which route is the shortest.
|
Ok.. Im going to tell you the code WHILE trying to teach you something..
First, you need to get all the names of the people in the game.. easy.. for(mob/M in ?????) Im going to let you fill in the ????'s. Its common sense. Next, you need to just get all of the PEOPLE, not mobs.
if(M.??????)
Now you need it do display the name.. Thats VERY simple, you SHOULD know how to do so. IF not, heres a hint. usr << ?.???? I hope i helped. -Rcet |
SSJ4_Gohan_Majin wrote:
No That was the Save File Sometimes people learn better by example so I will give you the code for a simple who verb. mob verb Who() for(var/mob/M in world) //goes through every mob in world if(M.client) //determines if M is a user usr << M.name //if it is a user, tell the person who clicked that M is in the world. |
Creek wrote:
SSJ4_Gohan_Majin wrote: Hopefully you will be on call for all his future questions, since what he just learned was that he doesn't need to learn where the documentation is or how to read it...he just needs to ask someone else to do it for him over and over. |
Creek wrote:
SSJ4_Gohan_Majin wrote: > mob > verb > Who() > for(var/mob/M in world) //goes through every mob in world > if(M.client) //determines if M is a user > usr << M.name //if it is a user, tell the person who clicked that M is in the world. > Does That Who Command Tell The Key in the World also? |