View Single Post
  #6  
Old 04-09-2007, 11:33 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Quote:
Originally Posted by shadowjones View Post
still got further than this nub could ever get -_- thanks for trying.

I'll continue to try to work on it and make something work ^_^
As I said what you have to do now is trigger the server to get the information

PHP Code:
function onActionServerside(action){
  switch (
action){
    case 
"GetTargetInfo":
      
temp.target findPlayer(params[1]);
      
temp.hpstats = {temp.target.clientr.player_hptemp.target.clientr.player_maxhp};
      
temp.mpstats = {temp.target.clientr.player_mptemp.target.clientr.player_maxmp};
      
temp.targettype temp.target.clientr.player_type;
 
    
player.triggerClient("weapon"name"GotTargetInfo"temp.hpstatstemp.mpstatstemp.targettype);
    break;
  }
}

//#CLIENTSIDE
function onActionClientside(action){
  switch (
action){
    case 
"GotTargetInfo":
      
ShowTargetInfo(params[1], params[2], params[3]);
    break;
  }
}

function 
setTarget(target)
  
triggerServer("weapon"name"GetTargetInfo"temp.target);

function 
ShowTargetInfo(playerhpstatsplayermpstatsplayertype){

  
showText(2003264"Arial""b"format("Health: %f/%f"temp.playerhpstats[0], temp.playerhpstats[1])); 
  
changeimgvis(2004); 

  
showText(2013280"Arial""b"format("Mana: %f/%f"temp.playermpstats[0], temp.playermpstats[1])); 
  
changeimgvis(2014); 

  
showText(2023296"Arial""b"format("Class: %s"temp.playertype)); 
  
changeimgvis(2024); 

Reply With Quote