View Single Post
  #2  
Old 04-09-2007, 11:01 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
PHP Code:
//#CLIENTSIDE
function onMouseDown(button){
  switch (
temp.button){
    case 
"left":
      
CheckPlayer(mousex, mousey);
    break;
  }
}

function 
CheckPlayer(mx, my){
  
temp.pid = testPlayer(temp.mx, temp.my);
  if (
temp.pid > -1) 
    
setTarget(players[temp.pid]);
}

public function 
setTarget(target){
  
temp.target = findPlayer(temp.target);

  
temp.playerhpstats =  {temp.target.clientr.player_hp, temp.target.clientr.player_maxhp};
  
temp.playermpstats = {temp.target.clientr.player_mp, temp.target.clientr.player_maxmp};
  
temp.playerclass = temp.target.clientr.player_type;

  
showText(200, 32, 64, "Arial", "b", format("Health: %f/%f", temp.playerhpstats[0], temp.playerhpstats[1]));
  
changeimgvis(200, 4);

  
showText(201, 32, 80, "Arial", "b", format("Mana: %f/%f", temp.playermpstats[0], temp.playermpstats[1]));
  
changeimgvis(201, 4);

  
showText(202, 32, 96, "Arial", "b", format("Class: %s", temp.playerclass));
  
changeimgvis(202, 4);
} 
Reply With Quote