[Ajuda] Prixmo?
#1

PHP код:
Dialog:EmpresasPrecisaProduto(playerid, response, listitem, inputtext[])
{
    if(!
response) return 1;
    new 
strlista[1024];
    switch(
listitem)
    {
        case 
0:
        {
            for(new 
i = 0; i < MAX_EMPRESAS; i++)
            {
                if(
EmpresaInfo[i][preciProdutos] > 0)
                {
                    
format(strlista, sizeof(strlista), "%s", EmpresaInfo[i][Nome]);
                }
                
Dialog_Show(playerid, EmpresasInfo, DIALOG_STYLE_LIST, "Empresas", strlista, "Selecionar", "Voltar");
            }
        }
    }
} 
alguem me ajuda a fazer um proximo ? aparecer de 15 em 15 empresas?
Reply
#2

EXPLIQUE um pouco mais q n intendi
Reply
#3

Toma essa base adapte para seu GM, deve existir modos melhores para fazer isso mas n й do meu interesse se aprofundar por isso й uma base para vocк ter uma ideia.

PHP код:
    switch(dialogid){
        case 
proximalista:{
            if(
response){
                new 
string[30], string2[128];
                
printf("%d", listitem);
                if(
listitem == 15){
                    for(new 
i = 16; i < 31; i++){
                        
format(string, sizeof(string), "%d\n", i);
                        
strcat(string2, string, sizeof(string2));
                        if(
i == 30){
                            
strcat(string2, "<<", sizeof(string2));
                            break;
                        }
                    }
                    
ShowPlayerDialog(playerid, proximalista2, DIALOG_STYLE_LIST, "LISTA", string2, "Escolher", "Cancelar");
                }    
            }
        }
        case 
proximalista2:{
            if(
response){
                
printf("%d", listitem);
                if(
listitem == 15){
                    new 
string[30], string2[64];
                    for(new 
i = 1; i < 30; i++){
                        
format(string, sizeof(string), "%d\n", i);
                        
strcat(string2, string, sizeof(string2));
                        if(
i == 15){
                            
strcat(string2, ">>", sizeof(string2));
                            break;
                        }
                    }    
                    
ShowPlayerDialog(playerid, proximalista, DIALOG_STYLE_LIST, "LISTA", string2, "Escolher", "Cancelar");
                }
            }
        }
    } 
PHP код:
CMD:ab(playerid, params[]){
    new 
string[30], string2[64];
    for(new 
i = 1; i < 30; i++){
        
format(string, sizeof(string), "%d\n", i);
        
strcat(string2, string, sizeof(string2));
        if(
i == 15){
            
strcat(string2, ">>", sizeof(string2));
            break;
        }
    }    
    
ShowPlayerDialog(playerid, proximalista, DIALOG_STYLE_LIST, "LISTA", string2, "Escolher", "Cancelar");
    return 
1;
} 
Reply
#4

vlw, consegui <3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)