[Ajuda] Velocidade na TextDraw
#1

Galera a textdraw estб atualizando muito rбpido e fora do normal do que era pra estar..

Vнdeo:

Clique aqui para acessar o vнdeo

Cуdigo:

Nome do servidor:


PHP код:
new AtualizarNomeDoSv[][] = {
    
"~y~] ~y~~h~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~r~~h~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~r~~h~~h~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~p~~h~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~p~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~g~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~g~~h~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~r~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~y~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]",
    
"~y~] ~w~BRASIL MATA-MATA 2014! GUERRA EM SAN FIERRO! ~y~]"
};
OnPlayerConnect:
TimerA[playerid] = SetTimerEx"AtualizarNome" 10000 true "i" playerid );
//
forward AtualizarNome(playerid);
public 
AtualizarNome(playerid)
{
    if ( !
IsPlayerConnected playerid ) ) return 0;
    new
        
str128 ]
    ;
    
format(str128"                                                     %s"AtualizarNomeDoSv[random(sizeof(AtualizarNomeDoSv))]);
    
PlayerTextDrawSetString(playeridConfigServer0str);
    return 
1;


Onde mostra os score, packet, ping, fps ( status ):


PHP код:
OnPlayerConnect:
TDScore[playerid] = SetTimerEx "AtualizarScore" 1000 true "i" playerid );
//
forward AtualizarScore playerid ); public AtualizarScore playerid ) {
    if ( !
IsPlayerConnected playerid ) ) return 0;
    new
        
STR 280 ]
    ;
    
format STR 280"~r~|~n~     ~r~Score: ~w~%d~n~     ~r~Mortes: ~w~%d~n~     ~r~EXP: ~w~%d~n~     ~r~Shots: ~w~%d~n~     ~r~Spree: ~w~%d~n~     ~r~Ping: ~w~%d~n~     ~r~FPS: ~w~%d~n~     ~r~Packet: ~w~%.2f~n~|~n~|"GetPlayerScore playerid ) , PlayerDados playerid ] [ Morreu ] , PlayerDados playerid ] [ Experiencia ] , PlayerDados playerid ][ Shots ] , Spree playerid ] , GetPlayerPing playerid ) , pFPS playerid ], NetStats_PacketLossPercent playerid ) );
    
PlayerTextDrawSetString playerid ScoreTextDraw0 playerid ] , STR );
    return 
true;

NOTA: Isso ocorre quando o servidor fica ligado direto umas 3 ou 4 hrs, as vezes mais e as vezes menos..
Reply
#2

Estбs a criar muitos timers so 1 coisa simples. Tenta optimizar isso

Crivas um TextDraw normal e fazias a actualizaзгo apenas 1 vez em vez de 100 ou ate msm 500
Reply
#3

pawn Код:
SetTimerEx( "AtualizarNome" , 10000 , true , "i" , playerid );
ta vendo aql 10 mil ali ?
ex: 1000 = 1 segund0
2000 = 2 segundos

e assim por dianteali ja q й 10000 й 10 segundos para atualizar.... se quiser pd aumentar ou diminuir
Reply
#4

Boa noite, teria como disponibilizar esse cуdigo dessa texdraw por completo?
Reply
#5

manda nome da musica
Reply
#6

Alguem tem esse código dessa textdraw?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)