void main()
{
int i; int z; int t;int health;int off;
void pl;
char cstring;
if(openborvariant("in_level")==0)
{
z = openborconstant("FRONTPANEL_Z");
drawbox(0, 240, 480, 32, z+1000, 1);
for(i=0; i<3; i++)
{
pl = getplayerproperty(i, "ent");
if(pl==NULL())
{
drawbox(i*160+32, 240, 126, 32, z+20000, 1);
}
else
{
drawbox(i*160+32, 240, 126, 32, z+1110, 45);
t = getentityproperty(pl, "mp")/10;
drawbox(i*160+55, 240, 11*t, 16, z+1111, 92); // magic pot
drawbox(i*160+55, 256, 11*t, 16, z+1111, 93);
health = getentityproperty(pl, "health");
off = (health-1)/20;
if (health<=15)// checks if the health is 15 or less and draws a red box
{
drawbox(i*160+54, 242, health, 2, z+18000, rgbcolor(255,0,0));//health red 1
drawbox(i*160+54, 244, health, 2, z+18000, rgbcolor(250,0,0));//health red 2
drawbox(i*160+54, 246, health, 2, z+18000, rgbcolor(245,0,0));//health red 3
} else { // if not, draws a yellow box
drawbox(i*160+54, 242, health, 2, z+18000, rgbcolor(255,255,0));//health yellow 1
drawbox(i*160+54, 244, health, 2, z+18000, rgbcolor(250,250,0));//health yellow 2
drawbox(i*160+54, 246, health, 2, z+18000, rgbcolor(245,245,0));//health yellow 3
}
drawstring(i*160+34, 263, 1, "x"+getplayerproperty(i, "lives"));
cstring = getglobalvar("cstring");
if(cstring!=NULL())
{
drawstring(i*160+55, 256, 2, cstring);
}
}
}
}
//drawstring(4, 100, 0, getglobalvar("debug"));
}