maxman
Well-known member
I'm trying to make score integer go high with a decimal by going to its left like you see below. That score 0 should stay where it is while it increases from player's attacks.
But I have a problem with a text in x in drawstring. I put it in the middle to test player's score. Every time player attacks, the score moves left little by little. I'm trying to retain that initial score in place while attacking.
But I have a problem with a text in x in drawstring. I put it in the middle to test player's score. Every time player attacks, the score moves left little by little. I'm trying to retain that initial score in place while attacking.
Code:
void main(){
void p1Ent = getplayerproperty(0, "entity");
void p2Ent = getplayerproperty(1, "entity");
int hres = openborvariant("hresolution");
if(p1Ent != NULL()){ // When player 1 entity is not empty
char p1Name = getentityproperty(p1Ent, "name"); //Player 1 entity's name
char p1Score = getplayerproperty(p1Ent, "score"); //Player 1 entity's score
int p1NameX = getentityproperty(p1Ent, "x");
int p1NameZ = getentityproperty(p1Ent, "z");
int p1NameA = getentityproperty(p1Ent, "y");
if(p1Score){
drawstring(160+(p1Score/-8),85,0,p1Score);
}
}
}