JaraLowell/OgarClient

how to ?

Closed this issue · 22 comments

How to make if I have the name 'hello' my name will look another color in the leaderboard?

How is it you host a web game and not know even the basics of the code you serve to your clients?

You could simply check what name is set, and then change the color to one you like. And can we stop opening new issues for something that is not an issue ?

i tried with if / else and not work

 if ( this.name == 'hello' ) {
                     ctx.fillStyle = me ? "#AAFFFF" : '#FFFAAA';;
                 
                } else {
                    ctx.fillStyle = me ? "#AAFFFF" : colors[i];
                 
                }

help me please

More easy to add it to
if(msg.admin) { msg.name = "\uD83D\uDD75"; msg.nameColor = "#7D7D7D"; divider = " "; }

like
if(msg.name == 'hello') { msg.nameColor = "#FFFAAA"; }

But that be things any JS coder should be able to figure out! 👿

lol :( i mean to the name in the leaderboard :(

is more hard :(

That course I already have it in 60% and it still does not work if / else, I also have functions, switch, operators and more, but I still can not do it

please help me

if (o == 'hello')

not this.name, but o

lol , soo easy ? ;-;

And how can I do an 'if', if it is an admin, that works without writing in the chat

You can't as leader board does not know how one is logged in.

nope, i mean to an if any, but with the condition that it is admin, not necessarily for the leaderboard, example in draw function:

if (window.admin) {

mainCtx.restore()
mainCtx.drawImage(image, x, y, size, isMass)

}

I did not know how to go to the variable, so I used it as a global variable XD

for example drawing an image from a URL if it is an administrator, this should work, but only works when I write in the chat, and I think this is by the chat handle

What I can do ?

Again you would need to server side add or edit. As the client not knows one be logged in as admin, most cheap way for you is send an msg over chat to let clients know but not write it to chat. Something like that, i my self not gone add this as i no need know when i am logged in as i know when i am ;3

the clients know with prefix of admin

0x40 for admin

No it knows that the chatting person is an admin, it not knows if the 'name' is playing, nor whose cells belong to said name. As the server no tell this. As that would need to be the server telling this and it does not. Nor is that truly planned. So in that your in bad luck.

oh nice