SA-MP Forums Archive
Progress Bar Nгo Enche Todo - 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: Progress Bar Nгo Enche Todo (/showthread.php?tid=624396)



[Ajuda] Progress Bar Nгo Enche Todo - WiliHacking - 15.12.2016

Seguinte galera, criei um Progress Bar para encher tudo, a cada 2 segundos ele enche 10, depois que eu digito o comando /teste. Sу que... ele nгo enche tudo, tipo, eu digito /teste ai da 2 segundos ele enche 10, beleza.. sу que como eu disse, a cada 2 segundos й pra ele encher 10, e ele sу ta enchendo apenas uma vez, por que serб? segue abaixo o cуdigo.

http://pastebin.com/0vgwkpvB


Respuesta: Progress Bar Nгo Enche Todo - SammyJ - 15.12.2016

PHP код:
new Barbarra1;

/* OnGameModeInit */
barra1 CreateProgressBar(492.00416.00135.505.19, -1100.0);
SetProgressBarMaxValue(barra1100);

/* OnPlayerSpawn */
ShowProgressBarForPlayer(playeridbarra1);

/* Public Criada */
forward barra(playerid);
public 
barra(playerid)
{
    
SetProgressBarValue(barra1GetProgressBarValue(playerid) + 10); // parte alterada 
    
UpdateProgressBar(barra1playerid);
    return 
1;
}

/* Comando Criado */
CMD:teste(playerid)
{
    
SetTimer("barra"1000true);
    return 
1;




Re: Progress Bar Nгo Enche Todo - WiliHacking - 16.12.2016

Vlw mano, deu certinho.