SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 25/04/2013, 12:23 AM   #1
DevilAgain
Huge Clucker
 
Join Date: Apr 2013
Posts: 341
Reputation: 8
Default Progress Bar

Estou com um errinho em relação ao progress:

PHP Code:
error 033: array must be indexed (variable "Carregando"
Linha

PHP Code:
Carregando CreateProgressBar(240.00275.00165.5026.2016711935100.0); 
__________________
Se seu tópico dizer +REP, eu ignoro-o.
DevilAgain is offline   Reply With Quote
Old 25/04/2013, 12:27 AM   #2
Sky™
High-roller
 
Sky™'s Avatar
 
Join Date: Aug 2012
Location: Apple Computer™
Posts: 1,783
Reputation: 351
Default Re: Progress Bar

pawn Code:
new Bar:Carregando = {INVALID_BAR_ID, ...};
__________________
Sky™ is offline   Reply With Quote
Old 25/04/2013, 12:51 AM   #3
iHarzard
Big Clucker
 
iHarzard's Avatar
 
Join Date: Apr 2013
Posts: 112
Reputation: 8
Default Re: Progress Bar

pawn Code:
Carregando[playerid] = CreateProgressBar(240.00, 275.00, 165.50, 26.20, 16711935, 100.0);
iHarzard is offline   Reply With Quote
Old 25/04/2013, 03:40 PM   #4
DevilAgain
Huge Clucker
 
Join Date: Apr 2013
Posts: 341
Reputation: 8
Default Re: Progress Bar

Nada funcionou, apenas erros...

iHarzard:

Code:
Carregando[playerid] = CreateProgressBar(240.00, 275.00, 165.50, 26.20, 16711935, 100.0);
Deu:

pawn Code:
error 017: undefined symbol "playerid"
__________________
Se seu tópico dizer +REP, eu ignoro-o.
DevilAgain is offline   Reply With Quote
Old 25/04/2013, 03:43 PM   #5
Lós
High-roller
 
Lós's Avatar
 
Join Date: Sep 2010
Location: Casterly Rock
Posts: 4,371
Reputation: 511
Default Re: Progress Bar

Aonde você tá botando esse código?
Lós is offline   Reply With Quote
Old 25/04/2013, 04:02 PM   #6
VenoN
Gangsta
 
VenoN's Avatar
 
Join Date: Aug 2012
Location: California
Posts: 701
Reputation: 53
Default Re: Progress Bar

pawn Code:
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
VenoN is offline   Reply With Quote
Old 25/04/2013, 04:25 PM   #7
hard_dalzot
Huge Clucker
 
hard_dalzot's Avatar
 
Join Date: Aug 2012
Location: Xanxerê - Santa Catarina
Posts: 370
Reputation: 11
Default Re: Progress Bar

pawn Code:
//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
__________________
Projeto Atual:
This Life is Crazy http://tlc-rpg.ucoz.com.br/

Atualmente: Sistema de Empregos 21% 5 Empregos interagíveis
Sistema de Login: 100%
Sistema de Casas: 0%
Sistema de Empresas: 0%
Sistema de Fazendas: 0%
Sistema de Banco: 0%
Sistema de Armas: 0%
Sistema de Carros: 0%
Sistema de Concessionária: 0%
Sistema VIP: 0%
Sistema de Admins: 0%
Sistema de Lojas: 0%
Mapa: 2%
A procura de um Sócio

Se ajudei não custa nada agradecer!!!
Obrigado!!!
hard_dalzot is offline   Reply With Quote
Old 25/04/2013, 06:16 PM   #8
DevilAgain
Huge Clucker
 
Join Date: Apr 2013
Posts: 341
Reputation: 8
Default Re: Progress Bar

Deu certo agora, mas como faço para o progressbar aparecer?
Tentei assim, mas so aparece o gametext.

pawn Code:
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;
    }
__________________
Se seu tópico dizer +REP, eu ignoro-o.
DevilAgain is offline   Reply With Quote
Old 25/04/2013, 06:22 PM   #9
Lós
High-roller
 
Lós's Avatar
 
Join Date: Sep 2010
Location: Casterly Rock
Posts: 4,371
Reputation: 511
Default Re: Progress Bar

pawn Code:
ShowProgressBarForPlayer(playerid, Carregando[playerid]);
Lós is offline   Reply With Quote
Old 25/04/2013, 06:35 PM   #10
DevilAgain
Huge Clucker
 
Join Date: Apr 2013
Posts: 341
Reputation: 8
Default Re: Progress Bar

@Lós funcionou, porém a barra fica assim e não aparece ela carregando



Tentei fazer assim:

pawn Code:
public AumentarBar(playerid)
{
        SetProgressBarValue(Carregando[playerid],100.0);
        UpdateProgressBar(Carregando[playerid],playerid);
    return 1;
}

E no comando:

pawn Code:
SetTimerEx("AumentarBar",50,true,"i",playerid);
__________________
Se seu tópico dizer +REP, eu ignoro-o.

Last edited by DevilAgain; 25/04/2013 at 07:23 PM.
DevilAgain is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Progress bar. budelis Scripting Help 1 04/12/2012 10:16 PM
[HELP] Progress Bar Kazuo Scripting Help 1 23/05/2012 06:58 AM
help with progress bar BlacKxStory Scripting Help 2 04/02/2012 04:09 PM
Progress Bar [FS] No Fear Scripting Help 1 03/02/2012 09:03 AM
[HELP] Progress bar. Type-R Scripting Help 2 01/02/2012 02:07 AM


All times are GMT. The time now is 01:02 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.