11.05.2013, 15:19
hello
i wanted to make textdraw to show you the heath i mad every thing and i made colors even but when i tested it the num of my health was 121323236 i don't know why i seted my health to 1 its changed to 5525633 i don't know why can you help me btw here is the code
i wanted to make textdraw to show you the heath i mad every thing and i made colors even but when i tested it the num of my health was 121323236 i don't know why i seted my health to 1 its changed to 5525633 i don't know why can you help me btw here is the code
pawn Код:
//Health Text Draw check
if(IsPlayerConnected(i))
{
if(IsSpawned[i])
{
new Float:phealth;
GetPlayerHealth(i,phealth);
if(phealth >=0 && phealth <= 30)
{
new Float:phealth1;
GetPlayerHealth(i,phealth1);
format(string,sizeof(string),"%d%",phealth1);
TextDrawSetString(HealthTD[i],string);
TextDrawColor(HealthTD[i],-16776961);
}
if(phealth >=70)
{
new Float:phealth1;
GetPlayerHealth(i,phealth1);
format(string,sizeof(string),"%d%",phealth1);
TextDrawSetString(HealthTD[i],string);
TextDrawColor(HealthTD[i],16711935);
}
if(phealth < 70 && phealth > 30)
{
new Float:phealth1;
GetPlayerHealth(i,phealth1);
format(string,sizeof(string),"%d%",phealth1);
TextDrawSetString(HealthTD[i],string);
TextDrawColor(HealthTD[i],-65281);
}
}
}