Help with this code.
#1

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;
}
Reply


Messages In This Thread
Help with this code. - by EmuS - 23.01.2013, 02:07
Re: Help with this code. - by AphexCCFC - 23.01.2013, 02:09
Re: Help with this code. - by jonrb - 23.01.2013, 02:56
Re: Help with this code. - by SuperViper - 23.01.2013, 03:05

Forum Jump:


Users browsing this thread: 1 Guest(s)