[Help] Dealership
#1

hi guys,
I need a little help on my system car dealership.

Here is the code.

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, 2780.4939, -1812.2635, 11.8438)) return ShowPlayerDialog(playerid, DIALOG_CARROS, DIALOG_STYLE_LIST, "Concessionбria", "Efetuar Compra de veiculo\nVisualizar Modelo", "Proximo", "Fechar");
    }
    return 1;
}
pawn Код:
if(dialogid == DIALOG_CARROS)
        {
            if(response)
            {
                if(listitem == 0)
                {
                    new Conteudo[3600];
                    SendClientMessage(playerid, -1, "Funcionou");
                    for(new i = 0; i < MAX_VEHICLES; i++)
                    {
                        format(drStr1, sizeof(drStr1), "Nome: %s | Preзo: %s\n", GetVehicleNameByModel(VeiculoInfo[playerid][Modelo1] - 400), GetVehiclePreco(i));
                        strcat(Conteudo, drStr1);
                    }
                    ShowPlayerDialog(playerid, DIALOG_COMPRAR_CARRO, DIALOG_STYLE_LIST, "Escolha um Veнculo para Comprar", Conteudo, "Comprar", "Cancelar");
                    return 1;
                }
                if(listitem == 1)
                {
                    new Conteudo[3600];
                    for(new i = 0; i < MAX_VEHICLES; i++)
                    {
                        format(drStr1, sizeof(drStr1), "Nome: %s | Preзo: %s\n", GetVehicleNameByModel(VeiculoInfo[playerid][Modelo1] - 400), GetVehiclePreco(i));
                        strcat(Conteudo, drStr1);
                    }
                    ShowPlayerDialog(playerid, DIALOG_VISUALIZAR_CARRO, DIALOG_STYLE_LIST, "Escolha um Veнculo para Visualizar", Conteudo, "Visualizar", "Cancelar");
                    return 1;
                }
            }
        }
The problem is, I click on any listitem and nothing happens.

Help-me please!
Reply
#2

It'll be a problem with the string. Had this problem before with a dealership and dialog, and I just messed around with the string and it worked.
Reply
#3

so I put in a comment and put print to print If work got in the prompt. More is not picked up :/. help-me! D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)