Quick help, whats the variable/function to get a player's health? Is this correct?: %health = %client.player.getDatablock().Health;
Here's the code i'm trying to incorporate.
%health = %client.player.getDatablock().Health;
if(%health <= 10)
{
%healthcolor = "ff0000";
}
else if(%health <= 25 && %health > 10)
{
%healthcolor = "ffff00";
}
else if(%health <= 50 && %health > 25)
{
%healthcolor = "ffcc00";
}
else if(%health <= 75 && %health > 50)
{
%healthcolor = "ccff00";
}
else if(%health <= 100 && %health > 75)
{
%healthcolor = "00ff00";
}
else
{
%healthcolor = "ffffff";
}
%client.infobartext = %client.infobartext @ "\c6Health: <color:" @ %healthcolor @ ">" @ %health @ "\c6%";