ID:175095
 
How can this be done? The reason I am asking is because of lag produced. I have this right now:

mob/verb

who()
set category="Commands"
usr<<"List of Players:"
for(var/mob/M in world)
if(M.client)
usr<<"\icon [client] [M.name]([M.key]) - \red L [M.Level] [M.Class]\black - House: [M.Guild]"


if the if(M.client) is removed, it checks for all mobs, including the monsters in the game. When anyone hits this who verb in the game it shows all the players very slowly, and I think it's because it's skipping over all the mobs that are not clients.

So is there a way to identify ONLY clients? Maybe somwhere in the for(var/mob/M in world) line?

-Dagolar
<code>var/list/players = list() client/New() ..() players += src client/Del() players -= src ..()</code>

That should do it. Then:

<code>mob/verb/Who() set category = "Commands" for(var/client/C in players) var/mob/M = C.mob usr << "\icon[M.icon] [M.name] ([C.key]) ..."<code>