Progress Bar -
DevilAgain - 24.04.2013
Estou com um errinho em relaзгo ao progress:
PHP код:
error 033: array must be indexed (variable "Carregando")
Linha
PHP код:
Carregando = CreateProgressBar(240.00, 275.00, 165.50, 26.20, 16711935, 100.0);
Re: Progress Bar -
Sky™ - 24.04.2013
pawn Код:
new Bar:Carregando = {INVALID_BAR_ID, ...};
Re: Progress Bar -
iHarzard - 24.04.2013
pawn Код:
Carregando[playerid] = CreateProgressBar(240.00, 275.00, 165.50, 26.20, 16711935, 100.0);
Re: Progress Bar -
DevilAgain - 25.04.2013
Nada funcionou, apenas erros...
iHarzard:
Код:
Carregando[playerid] = CreateProgressBar(240.00, 275.00, 165.50, 26.20, 16711935, 100.0);
Deu:
pawn Код:
error 017: undefined symbol "playerid"
Re: Progress Bar -
Lуs - 25.04.2013
Aonde vocк tб botando esse cуdigo?
Re: Progress Bar -
VenoN - 25.04.2013
pawn Код:
new Bar:Carregando[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
e nгo coloque isso em Ongamemodeinit garoto..
se vocк nгo ajudar nгo vai dar para te ajudar ..
Explique onde esta adcionando isto ai pow
Re: Progress Bar -
hard_dalzot - 25.04.2013
pawn Код:
//no topo do gm
new Bar:Carregando[MAX_PLAYERS] = {INVALID_BAR_ID, ...};
public OnGameModeInit()
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
Carregando[i] = CreateProgressBar(240.00, 275.00, 165.50, 26.20, 16711935, 100.0);
}
}
tenta ai e ve se da certo
Re: Progress Bar -
DevilAgain - 25.04.2013
Deu certo agora, mas como faзo para o progressbar aparecer?
Tentei assim, mas so aparece o gametext.
pawn Код:
if(strcmp(cmd, "/carregarm", true) == 0)
{
GameTextForPlayer(playerid,"~r~carregando~n~~b~Aguarde...",7000,3);
HideProgressBarForPlayer(playerid,Carregando[playerid]);
SetProgressBarValue(Carregando[playerid],0.0);
return 1;
}
Re: Progress Bar -
Lуs - 25.04.2013
pawn Код:
ShowProgressBarForPlayer(playerid, Carregando[playerid]);
Re: Progress Bar -
DevilAgain - 25.04.2013
@Lуs funcionou, porйm a barra fica assim e nгo aparece ela carregando
Tentei fazer assim:
pawn Код:
public AumentarBar(playerid)
{
SetProgressBarValue(Carregando[playerid],100.0);
UpdateProgressBar(Carregando[playerid],playerid);
return 1;
}
E no comando:
pawn Код:
SetTimerEx("AumentarBar",50,true,"i",playerid);