SA-MP Forums Archive
[Ajuda] Atualizar textdraw - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Atualizar textdraw (/showthread.php?tid=585081)



Atualizar textdraw - LuisFerreira - 10.08.2015

Bom fis algo para atualizar minutos e segundos, mais enfim nao funcionou..

PHP код:
forward AtualizarEvento(playerid);
public 
AtualizarEvento(playerid)
{
    new 
Luis[300];
    new 
minutesegundos;
    
segundos = (APlayerData[playerid][LoadingTimer] % 60);
    
minute = (APlayerData[playerid][LoadingTimer] - segundos) / 60;
    
SetTimerEx("AtualizarEvento"100false"d"playerid);
    
format(Luis,sizeof(Luis),"%i - %i"minutesegundos);
    
TextDrawSetString(InfoEvento[playerid], Luis);
    return 
1;




Re: Atualizar textdraw - IgorLuiz - 10.08.2015

Estб usando "PlayerTextDrawCreate" ou "TextDrawCreate"?


Re: Atualizar textdraw - LuisFerreira - 10.08.2015

TextDrawCreate, ela mostra tudo certo, mais porйm quando й pra os segundos ficar contando fica 0 - 0


Re: Atualizar textdraw - IgorLuiz - 10.08.2015

Se nгo й "PlayerTextDraw" porque usou "InfoEvento[playerid]"

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

    new 
Luis[300]; 
    new 
minutesegundos
    
segundos = (APlayerData[playerid][LoadingTimer] % 60); 
    
minute = (APlayerData[playerid][LoadingTimer] - segundos) / 60
    
SetTimerEx("AtualizarEvento"100false"d"playerid); 
    
format(Luis,sizeof(Luis),"%i - %i"minutesegundos); 
    
TextDrawSetString(InfoEventoLuis); 
    return 
1




Re: Atualizar textdraw - LuisFerreira - 10.08.2015

error 035: argument type mismatch (argument 1), a questгo esta que nao esta atualizando os segundos e minutos, tipo a hora, so que ae й quando inicia o evento comeeзa a contar os minutos e segundos que o evento esta iniciado..


Re: Atualizar textdraw - IgorLuiz - 10.08.2015

Quote:
Originally Posted by LuisFerreira
Посмотреть сообщение
error 035: argument type mismatch (argument 1), a questгo esta que nao esta atualizando os segundos e minutos, tipo a hora, so que ae й quando inicia o evento comeeзa a contar os minutos e segundos que o evento esta iniciado..
PHP код:
forward AtualizarEvento(playerid);
public 
AtualizarEvento(playerid)
{
    new 
Luis[60];
    new 
minutesegundos;
    
segundos = (APlayerData[playerid][LoadingTimer] % 60);
    
minute = (APlayerData[playerid][LoadingTimer] - segundos) / 60;
    
format(Luis60"%i - %i"minute ,segundos);
    
TextDrawSetString(InfoEventoLuis);
    
SetTimerEx("AtualizarEvento"100false"d"playerid);
    return 
1;




Re: Atualizar textdraw - LuisFerreira - 10.08.2015

Refis o codigo, e deu certo. +REP por tentar ajudar.