3dtext update lag
#4

Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
Use a low interval timer or use OnPlayerUpdate.
I think you should use something like this.
PHP код:
// In filterscript init or gamemodeinit
SetTimer("UpdatePlayerNametag"50true);
forward UpdatePlayersNametag();
public 
UpdatePlayersNametag()
{
    for(new 
GetPlayerPoolSize(); > -1i--)
    {
        if(
IsPlayerConnected(playerid))
        {
            
UpdatePlayerLabel(playerid);
        }
    }
    return 
1;
}
stock UpdatePlayerLabel(playerid)
{
    new 
Float:pHealth;
    new 
Float:pArmour;
    
GetPlayerHealth(playeridpHealth);
    
GetPlayerArmour(playeridpArmour);
    new 
naem[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnaemsizeof(naem));
    
format(stc,sizeof(stc),"\n\n\n{FFFFFF}%s\n{FF4040}%.0f/{9698FE}%.0f"naempHealthpArmour);
    
Update3DTextLabelText(PlayerLabel[playerid], 0xFFFFFFFFstc);
    return 
1;

Should've used SetTimerEx.
Reply


Messages In This Thread
3dtext update lag - by lucamsx - 09.11.2015, 22:07
Re: 3dtext update lag - by Ritzy2K - 10.11.2015, 05:33
Re: 3dtext update lag - by iKarim - 10.11.2015, 06:00
Re: 3dtext update lag - by Ritzy2K - 10.11.2015, 06:04
Re: 3dtext update lag - by Kevln - 10.11.2015, 06:26
Re: 3dtext update lag - by lucamsx - 10.11.2015, 06:46
Re: 3dtext update lag - by Ritzy2K - 10.11.2015, 08:01
Re: 3dtext update lag - by [ABK]Antonio - 10.11.2015, 08:13
Re: 3dtext update lag - by Ritzy2K - 10.11.2015, 08:50
Re: 3dtext update lag - by lucamsx - 10.11.2015, 09:15

Forum Jump:


Users browsing this thread: 2 Guest(s)