Quote:
Originally Posted by Marcus_Brown001
Thanks for the suggestions. The GetUserFlagBits works like it is; the reason I have it like that is because if you do a regular admin flag then root users do not return true for said flag. On my Dev Server I only have the root flag, so I put it like that in-case other people had the same problem.
Also, what you posted could be:
PHP Code:
if (GetUserFlagBits(i) & ADMFLAG_CHAT || GetUserFlagBits(i) & ADMFLAG_ROOT) continue;
However, I do believe that a return of '0' will be classified as 'true' whereas -1 would be false (or so I am under the impression of). Anywho, it works the way it is inside the plugin right now. I have never used FindTarget or ProcessTargetString even though it is the 'correct' way to do it, I am partial to my method. At the end of the day it works which is what I would be worried about.
I too have wondered that for some time, but I still would prefer this over the default SM private message system; it seems easier to me I guess, I dunno. Anyways, glad you like it and thanks for the commentary!
|
PHP Code:
ADMFLAG_ROOT <= 0
Is a part of the if, since ADMFLAG_ROOT isn't <= 0 (Why would it be?) and it's seeing that as a condition. You could also do it like that, but it doubles the cost of the call (Which probably isn't much, but you're calling it 24-32 times). It's too bad that GetUserFlagBits doesn't show the admin as having all flags
, at least in GetUserFlagBits
__________________