12.10.2011, 01:11
hi guys,
I need a little help on my system car dealership.
Here is the code.
The problem is, I click on any listitem and nothing happens.
Help-me please!
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;
}
}
}
Help-me please!