23.01.2013, 02:07
Hello, I have a good stat textdraw is using a timer to actualize, but the problem is that titilea lot when there is a bit of lag -.- And annoying haha.
pawn Код:
new Text:Stats[MAX_PLAYERS];
new Estadisticas[MAX_PLAYERS];
Estadisticas[playerid] = SetTimerEx("Actualizar",400,1,"e",playerid);
for(new playerid; playerid < MAX_PLAYERS; playerid++) {
Stats[playerid] = TextDrawCreate(.........................
}
forward Actualizar(playerid);
public Actualizar(playerid)
{
new strr[128];
TextDrawHideForPlayer(playerid,Stats[playerid]);
format(strr, sizeof(strr), " ~r~Score: ~w~%d ~g~Kills: ~w~%d ~b~Deaths: ~w~%d",PlayerInfo[playerid][Score],PlayerInfo[playerid][Kills],PlayerInfo[playerid][Deaths]);
TextDrawSetString(Stats[playerid],strr);
TextDrawShowForPlayer(playerid,Stats[playerid]);
return 1;
}