Open BoatXD opened 8 years ago
A quick and dirty solution is:
window.agar.hooks.updateLeaderboard = () => {
for (var item of window.agar.top)
if (item.name.includes("Hello")) {
item.id = window.agar.myCells[0] // make agar code think that this item is yours
item.name += " ~♡" // you can change name as well
}
}
Hovewer, if you wanna a clean solution, I suggest you to draw your own leaderboard UI.
Just create a div
on top of game canvas and update it inside updateLeaderboard
hook:
window.agar.hooks.updateLeaderboard = () => {
// update your div contents here with contents of `window.agar.top`
return true // do not draw original leaderboard UI
}
the first think didnt even work
and with window.agar.hooks.updateLeaderboard = () => {
// update your div contents here with contents of window.agar.top
return true // do not draw original leaderboard UI
}
could i use html in the "div" area? and how could i make it if it includes something in their name it colors it
If "top" would have the letters "Hello" within their name they would have a red name, how could i do that? (I know it says read only but is there a way or how could i do so in any way possible)