[Ajuda] Barra de progress nгo aparece
#1

Como diz no titulo code abaixo

Code:
PHP код:
//==============================================================================
#include < a_samp >
#inlcude < progress >
//==============================================================================
new Status_Progress_TR[MAX_PLAYERS] = 0;
new 
Bar:Progress_TR[MAX_PLAYERS];
new 
Timer_Progress_TR[MAX_PLAYERS];
//==============================================================================
public OnPlayerConnect(playerid)
{
    
Progress_TR[playerid] = CreateProgressBar(220.000000365.000000180.50000014.20000016711935100.0); // "tr"
    
return 1;
}
//==============================================================================
public OnPlayerEnterCheckpoint(playerid)
{
    if(
GetPlayerState(playerid) == PLAYER_STATE_SPECTATING) return 0;
    if(
CP[playerid] == 1)
    {
        
GameTextForPlayer(playerid"~r~Alvo localizado!"25003);
        
DisablePlayerCheckpoint(playerid);
        
CP[playerid] = 0;
        
HidePlayerArrow(playerid);
    }
    if(
CP[playerid] == 2)
    {
        
GameTextForPlayer(playerid"~r~GPS: ~w~VOCE CHEGOU!"25001);
        
DisablePlayerCheckpoint(playerid);
        
CP[playerid] = 0;
        
HidePlayerArrow(playerid);
    }
    for(new 
0MAX_GZSi++)
    {
        if(
GetPlayerVisibleDynamicCP(playerid) == ChecksDominio[i])
        {
            if(
Player[playerid][Admin] >= || Player[playerid][Cargo] >= || Player[playerid][Dono] >= || Player[playerid][Lider] >= || Player[playerid][BOPE] >= || Player[playerid][PMRJ] >= || Player[playerid][CORE] >= 4)
            {
                if(
ContagemDominio[i] != 0) return 1;
                if((
strcmp(GZDono[i], "CV"true) == 0) && Player[playerid][Faccoes] == 1||
                (
strcmp(GZDono[i], "CV"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "CV"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "ADA"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "ADA"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "ADA"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "TCP"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "TCP"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "TCP"true) == 0) && Player[playerid][Faccoes] == ||
                (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][Faccoes] == 10 ||
                (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][Faccoes] == 11 ||
                (
strcmp(GZDono[i], "MLC"true) == 0) && Player[playerid][Faccoes] == 12 ||
                (
strcmp(GZDono[i], "CORE"true) == 0) && Player[playerid][CORE] >= ||
                (
strcmp(GZDono[i], "BOPE"true) == 0) && Player[playerid][BOPE] >= ||
                (
strcmp(GZDono[i], "PMRJ"true) == 0) && Player[playerid][PMRJ] >= 1)
                return 
SCM(playeridCOR_ERRO"[ERRO]: Sua organizaзгo jб dominou essa favela.");
                
SetPVarInt(playerid,"GZAtacada",i);
                
ContagemDominio[i] = SetTimerEx("Contagem",1000,1,"i",playerid);
                
GangZoneFlashForAll(GangZonas[GetPVarInt(playerid,"GZAtacada")],GetPlayerColor(playerid));
                
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: O '%s' estб tomando a favela '%s' da '%s'."Nome(playerid), GangZone[i][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
                
//
                
ShowProgressBarForPlayer(playeridProgress_TR[playerid]);
                
Timer_Progress_TR[playerid] = SetTimerEx("Dominando"300true"i"playerid);
                return 
1;
            }
            else 
SCM(playeridCOR_ERRO"[ERRO]: Vocк nгo tem permissгo para dominar essa favela!");
        }
    }
    return 
1;
}
//==============================================================================
public OnPlayerLeaveCheckpoint(playerid)
{
    for(new 
i=0;i<MAX_GZSi++)
    {
        if(
GetPVarInt(playerid,"GZAtacada") != -1)
        {
            
SCM(playeridCOR_ERRO"[ERRO]: Vocк cancelou o dominio da favela.");
            
KillTimer(ContagemDominio[GetPVarInt(playerid,"GZAtacada")]);
            
ContagemDominio[GetPVarInt(playerid,"GZAtacada")] = 0;
            
GangZoneStopFlashForAll(GangZonas[GetPVarInt(playerid,"GZAtacada")]);
            
SetPVarInt(playerid,"GZAtacada",-1);
            
SetPVarInt(playerid,"Tempo",0);
            
//
            
Finalizar_Progress_TR(playerid);
            return 
1;
        }
    }
    return 
1;
}
//==============================================================================
forward Contagem(playerid);
public 
Contagem(playerid)
{
    new 
string[128];
    if(
GetPVarInt(playerid,"Tempo") == 30)
    {
        if(
Player[playerid][BOPE] >= 1)
        {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A 'BOPE' pacificou a favela '%s' da facзгo '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_BOPE;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "BOPE";
        }
        else if(
Player[playerid][PMRJ] >= 1)
        {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A 'PMRJ' pacificou a favela '%s' da facзгo '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_PMRJ;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "PMRJ";
        }
        else if(
Player[playerid][CORE] >= 1)
        {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A 'CORE' pacificou a favela '%s' da facзгo '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_CORE;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "CORE";
        }
        else if(
Player[playerid][Faccoes] == || Player[playerid][Faccoes] == 2  || Player[playerid][Faccoes] == 3)
        {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A facзгo 'CV' tomou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_CV;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "CV";
        }
        else if(
Player[playerid][Faccoes] == || Player[playerid][Faccoes] == 5  || Player[playerid][Faccoes] == 6) {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A facзгo 'ADA' tomou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_ADA;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "ADA";
        }
        else if(
Player[playerid][Faccoes] == || Player[playerid][Faccoes] == 8  || Player[playerid][Faccoes] == 9) {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A facзгo 'TCP' tomou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_TCP;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "TCP";
        }
        else if(
Player[playerid][Faccoes] == 10 || Player[playerid][Faccoes] == 11 || Player[playerid][Faccoes] == 12) {
            
SendFormattedMessageToAll(0xFFFFD2AA"-GFInfo-: A facзгo 'MLC' tomou a favela '%s' da '%s'."GangZone[GetPVarInt(playerid,"GZAtacada")][GZName], GZDono[GetPVarInt(playerid,"GZAtacada")]);
            
GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor] = COR_MLC;
            
GZDono[GetPVarInt(playerid,"GZAtacada")] = "MLC";
        }
        
GivePlayerMoney(playerid10000);
        
GangZoneHideForAll(GangZonas[GetPVarInt(playerid,"GZAtacada")]);
        
GangZoneShowForAll(GangZonas[GetPVarInt(playerid,"GZAtacada")], GangZone[GetPVarInt(playerid,"GZAtacada")][GZColor]);
        
KillTimer(ContagemDominio[GetPVarInt(playerid,"GZAtacada")]);
        
ContagemDominio[GetPVarInt(playerid,"GZAtacada")] = 0;
        
SetPVarInt(playerid,"GZAtacada",-1);
        
SetPVarInt(playerid,"Tempo",0);
        
//
        
Finalizar_Progress_TR(playerid);
        return 
1;
    }
    else
    {
        
SetPVarInt(playerid,"Tempo",GetPVarInt(playerid,"Tempo")+1);
        
format(string,sizeof(string),"~w~%i / ~r~30"GetPVarInt(playerid,"Tempo"));
        
GameTextForPlayer(playeridstring25003);
    }
    return 
1;
}
//==============================================================================
stock Finalizar_Progress_TR(playerid)
{
   
HideProgressBarForPlayer(playeridProgress_TR[playerid]);
   
DestroyProgressBar(Progress_TR[playerid]);
   
KillTimer(Timer_Progress_TR[playerid]);
}
//==============================================================================
forward Dominando(playerid);
public 
Dominando(playerid)
{
     
Status_Progress_TR[playerid] ++;
     
SetProgressBarValue(Progress_TR[playerid], Status_Progress_TR[playerid]);
     
UpdateProgressBar(Progress_TR[playerid]);
     if(
Status_Progress_TR[playerid] == 100.0)
     {
         
Status_Progress_TR[playerid] = 0;
         
UpdateProgressBar(Progress_TR[playerid]);
         return 
1;
     }
     return 
1;

Vo em cima da gz domina normal sу que nгo aparece a barra da progress carregando
Reply
#2

Alguem ajuda
Reply
#3

alguem? namoral
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)