ID:158855
 
How can I make it so certain stats show up depending on a var?

mob
var
stat1 = 1

Stat()
statpanel("[usr.name]")
stat("1")
stat("2")
if(usr.stat1 == 1)
stat("3")
else
stat("4")


Like that...only that doesn't work. :P
Thanks!

-Nick
Actually, that does(should) work. Also, use boolean instead of "==1". I think I've told you that before.
In response to Kaiochao
Also, you should be using src instead of usr.
In response to Garthor
Even though I definitely agree with using src here. I do believe Stat() is one of those procs that it won't actually matter unless you're doing some kind of obscure usage (calling it manually, etc...).
In response to Nadrew
Well, only if you consider the built-in variable client/statobj to be "obscure".

Which I do.

Oh wait, the example was actually under stat(). Oh well, point still stands.

But in general, if somebody is mixing src and usr, they should stop doing that and stick with just one. Usually src.