29.04.2010, 18:03
ok, i made a stat bar, for health armour kills and deaths, floating them on a textdraw, but ingame, ID 0 see's ID 1's stats.
Any ideas? I need this fixed as soon as possible, i have tryed EVERYTHING and still nothing.
pawn Код:
forward stats();
public stats()
{
for(new playerid; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerConnected(playerid))
{
new Float:pHealth, Float:pArmour, string[15];
GetPlayerHealth(playerid,pHealth);
format(string, sizeof(string), "Health:%.0f", pHealth);
TextDrawSetString(Textdraw2, string);
GetPlayerArmour(playerid,pArmour);
format(string, sizeof(string), "Armour:%.0f", pArmour);
TextDrawSetString(Textdraw3, string);
format(string, sizeof(string), "Kills:%.0f", GetPlayerScore(playerid));
TextDrawSetString(Textdraw4, string);
format(string, sizeof(string), "Deaths:%.0f", GetPVarInt(playerid,"Deaths"));
TextDrawSetString(Textdraw5, string);
}
}
}