JaraLowell/OgarClient

about prefix and flags

Closed this issue · 3 comments

I have done an if with the variable admin, whose variable is equal to:

Var admin = !! (flags & 0x40)

The problem is that in my if there is a drawImage that draws a certain image inside the cell, but only works when I write in the chat, in other words the skin is drawn only when written in the chat, how can I solve it? I think it has to do with time, or with the flags

if i delete "flags" of admin var , it work , but all appear as admin
And the image I see only me

Should not change 'skins' for admins, beside point it makes no sense and all have access to it... IT be something that would also be server side, if logged in as admin, set skin to admin skin. Not something yuo let chat handle :3

I understand, but how can I solve it by the client? Help me I'm a newbie

Because it only works when I write in the chat? And how to solve it?

Apart is not the only thing, I also made an if if an admin is in the top 10, it appears in another color

	
if (window.admin) {

                ctx.fillStyle = me ? "#AFE40E" : "#FFFFFF";
				
				}
				else {
					   ctx.fillStyle = me ? "#FFAAAA" : "#FFFFFF";
				}

but only work when i write in the chat