ID:148507
 
I'm trying to make it so when someone looks in the statpanel "Scores" they the see a playing mobs but no matter what I try to do I get NPCs too. Little Help?

mob
Stat()
for(var/mob/M in world)
statpanel("Scores")
stat("Score","[M]/[M.Gold]")
Theosco wrote:
I'm trying to make it so when someone looks in the statpanel "Scores" they the see a playing mobs but no matter what I try to do I get NPCs too. Little Help?

mob
Stat()
for(var/mob/M in world)
statpanel("Scores")
stat("Score","[M]/[M.Gold]")
mob
Stat()
statpanel("Scores")
for(var/mob/M in world)
if(M.client)
stat("Score","[M]/[M.Gold]")
In response to Jotdaniel
Looping through every mob is not a good idea...
for(var/client/C in world)
if(C.mob) //safety check
stat("Score","[C.mob]/[C.mob.Gold]")