Is there some way I could only boot players instead of looking at every mob in the world?
I know there is one way, but I wonder if there was a simplier or a smaller way to do this.
ID:163927
![]() Jul 27 2007, 12:40 pm
|
|
Or just have players be of a different mob path. Like mob/players, then just cycle through the players.
|
Dession wrote:
Or just have players be of a different mob path. Like mob/players, then just cycle through the players. But doing it that was requires a for() and isn't compatible with verbs! Unless you make it more complicated and add this proc: proc/Players() |
DadGun wrote:
I mean like it would show every player's name if the player is a cilent. That's not what it does? |
You can try something like foomer told you..except
proc/Players() Just set it up that only mobs with a key are added to the list. You will also want to add "Cancel" so you're not forced to kick someone if you change ur mind. Here's my version: mob/verb that one is recommended let me know how it turns out |
I generally like to loop through clients, adding the name of the mob atom they are controlling.
proc/PlayerList() Sending the client as an associative value avoids having to look up the value by name. When you delete a client, all of the necessary functions are calling, like mob.Logout() and the deletion of the mob the client controlled. |
Learned wrote:
You can try something like foomer told you..except > proc/Players() Just set it up that only mobs with a key are added to the list. You will also want to add "Cancel" so you're not forced to kick someone if you change ur mind. > mob/verb that one is recommended let me know how it turns out Much simpler this way, plus you can type the whole command it and you're not forced to go through an input box. mob/verb/Boot(mob/M as mob|null in Players()) You definitely don't want to have a function like Players() programmed directly into a single verb like Boot(), considering there's a ton of ways you can use a function like that! |
You can use:
If you don't understand how to do that, search the forums. I've probably written it out a dozen times.