Quote:
Originally Posted by shadowjones
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_hp, temp.target.clientr.player_maxhp};
temp.mpstats = {temp.target.clientr.player_mp, temp.target.clientr.player_maxmp};
temp.targettype = temp.target.clientr.player_type;
player.triggerClient("weapon", name, "GotTargetInfo", temp.hpstats, temp.mpstats, temp.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(playerhpstats, playermpstats, playertype){
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.playertype));
changeimgvis(202, 4);
}