| Gunderak |
09-04-2011 10:58 AM |
Mouse over for names and info
It basically just shows their nick, account and if there staff their position :)
add accounts in this.staffposition for their names to have a rank.
PHP Code:
//#CLIENTSIDE function onCreated() { //This is a list of ranks, add graal accounts to it as you please. this.lats = { "Graal######" }; this.admins = { "Graal######" }; this.nats = { "Graal######" }; this.gfx = { "Graal######" }; this.sfx = { "Graal######" }; this.eventsteam = { "Graal######" }; onTimeout(); }
function onTimeout() { //Hides the info so that if your mouse isnt over players they wont show. Player_Name.hide(); Player_Account.hide(); Admin_Ranks.hide(); LAT_Ranks.hide(); NAT_Ranks.hide(); GFX_Ranks.hide(); Events_Team_Ranks.hide(); SFX_Ranks.hide(); //Checks if your mouse is over a player. for (temp.pl: findNearestPlayers(mousex, mousey)) { if (mousex in | pl.x, pl.x + 2.5 | && mousey in | pl.y, pl.y + 3 | ) { //Creates the gui's to show. new GuiTextCtrl("Player_Name") { profile = GuiBlueTextProfile; height = 20; text = "Name: " @ temp.pl.nick; width = 200; x = mousescreenx + 15; y = mousescreeny - 5; red = 1; green = 1; blue = 1; alpha = 1; } new GuiTextCtrl("Player_Account") { profile = GuiBlueTextProfile; height = 20; text = "Account: " @ temp.pl; width = 200; x = mousescreenx + 15; y = mousescreeny + 10; red = 1; green = 1; blue = 1; alpha = 1; } //Shows "Rank: Staffrank" if your account is listed above. if (temp.pl.account in this.admins) { new GuiTextCtrl("Admin_Ranks") { profile = GuiBlueTextProfile; height = 20; text = "Rank: Admin"; width = 200; x = mousescreenx + 15; y = mousescreeny + 25; red = 1; green = 1; blue = 1; alpha = 1; Admin_Ranks.show(); } } if (temp.pl.account in this.lats) { new GuiTextCtrl("LAT_Ranks") { profile = GuiBlueTextProfile; height = 20; text = "Rank: LAT"; width = 200; x = mousescreenx + 15; y = mousescreeny + 25; red = 1; green = 1; blue = 1; alpha = 1; LAT_Ranks.show(); } } if (temp.pl.account in this.nats) { new GuiTextCtrl("NAT_Ranks") { profile = GuiBlueTextProfile; height = 20; text = "Rank: NAT"; width = 200; x = mousescreenx + 15; y = mousescreeny + 25; red = 1; green = 1; blue = 1; alpha = 1; NAT_Ranks.show(); } } if (temp.pl.account in this.gfx) { new GuiTextCtrl("GFX_Ranks") { profile = GuiBlueTextProfile; height = 20; text = "Rank: GFX"; width = 200; x = mousescreenx + 15; y = mousescreeny + 25; red = 1; green = 1; blue = 1; alpha = 1; GFX_Ranks.show(); } } if (temp.pl.account in this.sfx) { new GuiTextCtrl("SFX_Ranks") { profile = GuiBlueTextProfile; height = 20; text = "Rank: SFX"; width = 200; x = mousescreenx + 15; y = mousescreeny + 25; red = 1; green = 1; blue = 1; alpha = 1; SFX_Ranks.show(); } } if (temp.pl.account in this.eventsteam) { new GuiTextCtrl("Events_Team_Ranks") { profile = GuiBlueTextProfile; height = 20; text = "Rank: Events Team"; width = 200; x = mousescreenx + 15; y = mousescreeny + 25; red = 1; green = 1; blue = 1; alpha = 1; Events_Team_Ranks.show(); } } //Shows players name and account regardless of it there staff. Player_Name.show(); Player_Account.show(); } } //Loops it so its checking constantly if your mouse is on a player. settimer(0.05); }
Any feedback is appreciated :D
|