View Single Post
  #1  
Old 09-04-2011, 10:58 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
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.plfindNearestPlayers(mousexmousey)) {
    if (
mousex in pl.xpl.2.5 | && mousey in pl.ypl.| ) {
//Creates the gui's to show.
      
new GuiTextCtrl("Player_Name") {
        
profile GuiBlueTextProfile;
        
height 20;
        
text "Name:       " temp.pl.nick;
        
width 200;
        
mousescreenx 15;
        
mousescreeny 5;
        
red 1;
        
green 1;
        
blue 1;
        
alpha 1;
      }
      new 
GuiTextCtrl("Player_Account") {
        
profile GuiBlueTextProfile;
        
height 20;
        
text "Account:   " temp.pl;
        
width 200;
        
mousescreenx 15;
        
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;
          
mousescreenx 15;
          
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;
          
mousescreenx 15;
          
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;
          
mousescreenx 15;
          
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;
          
mousescreenx 15;
          
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;
          
mousescreenx 15;
          
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;
          
mousescreenx 15;
          
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
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion

Last edited by Gunderak; 09-04-2011 at 04:01 PM..
Reply With Quote