Hey
Bloodbane, this script works perfect!!! Thank yuou again my friend...
I tried the MP script to display the mp counter and it works, but there are 2 things I don't know how to solve it, i appreciate it if you can help me again.
1 - The MP Display shows MP and MPMAX, i just need to show the MP.
2 - The MP start with maximum value, i need start it with counter at 0 . ( script to set players MP to 0 at beginning of game ) I didnt find this one.
Iam using the Clafan Advance MP Script:
// in update.c
void main()
{
//
void p1 = getplayerproperty(0, "entity");
void p2 = getplayerproperty(1, "entity");
void p3 = getplayerproperty(2, "entity");
void p4 = getplayerproperty(3, "entity");
char p1health;
char p2health;
char p3health;
char p4health;
char p1mp;
char p2mp;
char p3mp;
char p4mp;
//HP text script
if(getentityproperty(p1, "exists")) {
int p1disphealth = getentityproperty(p1, "health");
if(p1disphealth < 0) p1disphealth = 0;
p1health = p1disphealth+"/"+getentityproperty(p1, "maxhealth");
drawstring(1000, 1000, 0, p1health);
}
if(getentityproperty(p2, "exists")) {
int p2disphealth = getentityproperty(p2, "health");
if(p2disphealth < 0) p2disphealth = 0;
p2health = p2disphealth+"/"+getentityproperty(p2, "maxhealth");
drawstring(117, 205, 0, p2health);
}
if(getentityproperty(p3, "exists")) {
int p3disphealth = getentityproperty(p3, "health");
if(p3disphealth < 0) p3disphealth = 0;
p3health = p3disphealth+"/"+getentityproperty(p3, "maxhealth");
drawstring(193, 205, 0, p3health);
}
if(getentityproperty(p4, "exists")) {
int p4disphealth = getentityproperty(p4, "health");
if(p4disphealth < 0) p4disphealth = 0;
p4health = getentityproperty(p4, "health")+"/"+getentityproperty(p4, "maxhealth");
drawstring(272, 205, 0, p4health);
}
//MP text script
if(getentityproperty(p1, "exists")) {
int p1dispmp = getentityproperty(p1, "mp");
if(p1dispmp < 0) p1dispmp = 0;
p1mp = p1dispmp+"/"+getentityproperty(p1, "maxmp");
drawstring(222, 10, 5, p1mp);
}
if(getentityproperty(p2, "exists")) {
int p2dispmp = getentityproperty(p2, "mp");
if(p2dispmp < 0) p2dispmp = 0;
p2mp = p2dispmp+"/"+getentityproperty(p2, "maxmp");
drawstring(117, 215, 0, p2mp);
}
if(getentityproperty(p3, "exists")) {
int p3dispmp = getentityproperty(p3, "mp");
if(p3dispmp < 0) p3dispmp = 0;
p3mp = p3dispmp+"/"+getentityproperty(p3, "maxmp");
drawstring(193, 215, 0, p3mp);
}
if(getentityproperty(p4, "exists")) {
int p4dispmp = getentityproperty(p4, "mp");
if(p4dispmp < 0) p4dispmp = 0;
p4mp = getentityproperty(p4, "mp")+"/"+getentityproperty(p4, "maxmp");
drawstring(272, 215, 0, p4mp);
}