[HELP][HELP][HELP][HELP]
#4

Quote:
Originally Posted by MBilal
Посмотреть сообщение
You are updating Textdraw for player but you put loop in that no need of that loop .
it will spam the updates. also loop work fast it will not show your stats or any one .
when textdraw(playerid) function called the loop start running everytime it will make
also lag in your server .
Hope you understand.

PHP код:
forward textdraw(playerid); 
public  
textdraw(playerid

         if(
IsPlayerConnected(playerid)) 
        { 
         new 
pscore[127]; 
        
format(pscoresizeof(pscore), "Score : ~y~%d" ,GetPlayerScore(playerid)); 
        
PlayerTextDrawSetString(playeridTextdraw1[playerid], pscore); 
        
//new pname[128]; 
        
new names[MAX_PLAYER_NAME]; 
        
GetPlayerName(playeridnamessizeof(names)); 
        
format(namessizeof(names),"Name : ~y~%s" ,names); 
        
PlayerTextDrawSetString(playeridTextdraw2[playerid], names); 
        new 
prank[129]; 
        
format(pranksizeof(prank), "Rank : ~y~%s" ,GetRankName(playerid)); 
        
PlayerTextDrawSetString(playeridTextdraw3[playerid], prank); 
        new 
pclass[130]; 
        
format(pclasssizeof(pclass), "Class : ~y~%s" ,GetClass(playerid)); 
        
PlayerTextDrawSetString(playeridTextdraw4[playerid], pclass); 
        new 
pkill[131]; 
        
format(pkillsizeof(pkill), "Kills : ~y~%d" ,PlayerInfo[playerid][Kills]); 
        
PlayerTextDrawSetString(playeridTextdraw5[i], pkill); 
        new 
pdeath[132]; 
        
format(pdeathsizeof(pdeath), "Deaths : ~y~%d" ,PlayerInfo[i][Deaths]); 
        
PlayerTextDrawSetString(playeridTextdraw6[playerid], pdeath); 
        new 
pdkill
        new 
pdkills[100]; 
        if(
PlayerInfo[playerid][Deaths] == 0pdkill 1; else pdkill PlayerInfo[playerid][Deaths]; 
        
format(pdkillssizeof(pdkills), "K/D Ratio : ~y~%0.2f" ,Float:PlayerInfo[playerid][Kills]/Float:pdkill); 
        
PlayerTextDrawSetString(playeridTextdraw7[playerid], pdkills); 
        new 
pip[136]; 
        new 
tmp33[50]; 
        
GetPlayerIp(playerid,tmp33,50); 
        
format(pip,sizeof(pip),"IP : ~y~%s"tmp33); 
        
PlayerTextDrawSetString(playeridTextdraw8[playerid], pip); 
        new 
phealthw[137]; 
        new 
Float:armour
        
GetPlayerArmour(playeridarmour); 
        
format(phealthwsizeof(phealthw),"%0.0f"armour); 
        
PlayerTextDrawSetString(playeridhealthcount[playerid], phealthw); 
        new 
phealthr[137]; 
        new 
Float:health
        
GetPlayerHealth(playerid,health); 
        
format(phealthrsizeof(phealthr),"%0.0f"health); 
        
PlayerTextDrawSetString(playeridhealthcount1[playerid], phealthr); 
        new 
ping[138]; 
        
format(ping,sizeof(ping),"Ping : ~r~%i",GetPlayerPing(playerid)); 
        
PlayerTextDrawSetString(playeridTextPing[playerid], ping); 
        } 
    } 
I will copy the code ??

its timer forwarding the code above and yea its loop


PHP код:
public OnGameModeInit
{
  
SetTimer(textdraw,1000,true)
  return 
1;

!YOur right my server is lag now OMG
Reply


Messages In This Thread
Help Textdraw Stats buggy - by Hemeei - 14.08.2015, 14:30
Re: [HELP][HELP][HELP][HELP] - by andreistalker - 14.08.2015, 14:39
Re: [HELP][HELP][HELP][HELP] - by MBilal - 14.08.2015, 15:13
Re: [HELP][HELP][HELP][HELP] - by Hemeei - 14.08.2015, 15:18
Re: [HELP][HELP][HELP][HELP] - by MBilal - 14.08.2015, 15:22
Re: [HELP][HELP][HELP][HELP] - by Hemeei - 14.08.2015, 15:25
Re: [HELP][HELP][HELP][HELP] - by MBilal - 14.08.2015, 15:39
Re: [HELP][HELP][HELP][HELP] - by Hemeei - 14.08.2015, 16:01
Re: [HELP][HELP][HELP][HELP] - by MBilal - 14.08.2015, 16:22
Re: [HELP][HELP][HELP][HELP] - by Hemeei - 15.08.2015, 12:59

Forum Jump:


Users browsing this thread: 3 Guest(s)