22.08.2016, 20:12
eu fiz um sistema de tunar aqui.. mas quando eu clico em paint jobs ele nгo seleciona.. ta certo as dialog??
pawn Код:
new car;
car = GetPlayerVehicleID(playerid);
if (dialogid == Tunar) // Menu
{
if (response) {
if (listitem == 0) // Rodas
{
ShowPlayerDialog(playerid, Tunar + 1, DIALOG_STYLE_LIST, "Rodas", "Estilo 1 \nEstilo 2 \nEstilo 3 \nEstilo 4 \nEstilo 5 \nEstilo 6 \nVoltar", "Selecionar", "Fechar");
}
if (listitem == 1) // Cores
{
ShowPlayerDialog(playerid, Tunar + 2, DIALOG_STYLE_LIST, "Cores", "Preto \nBranco \nAzul Escuro \nAzul Claro \nVerde \nVermelho \nAmarelo \nRosa \nVoltar", "Pintar!", "Fechar");
}
if (listitem == 2) // Paintjobs
{
ShowPlayerDialog(playerid, Tunar + 4, DIALOG_STYLE_LIST, "Paintjobs", "Estilo 1 \nEstilo 2 \nEstilo 3 \nVoltar", "Pintar!", "Fechar");
}
if (listitem == 3) // Suspensгo
{
AddVehicleComponent(car, 1087);
}
}
return 1;
}
if (dialogid == Tunar + 1) // Rodas
{
if (response) {
if (listitem == 0) // Estilo 1
{
AddVehicleComponent(car, 1084);
}
if (listitem == 1) // Estilo 2
{
AddVehicleComponent(car, 1073);
}
if (listitem == 2) // Estilo 3
{
AddVehicleComponent(car, 1075);
}
if (listitem == 3) // Estilo 4
{
AddVehicleComponent(car, 1077);
}
if (listitem == 4) // Estilo 5
{
AddVehicleComponent(car, 1079);
}
if (listitem == 5) // Estilo 6
{
AddVehicleComponent(car, 1080);
}
if (listitem == 6) // Voltar
{
ShowPlayerDialog(playerid, Tunar, DIALOG_STYLE_LIST, "{F63D00}# {FFFFFF}Tunar Menu", "Rodas\nCores\nPaintjobs\nSuspensгo\nAutoTuning", "Selecionar", "Fechar");
}
}
return 1;
}
if (dialogid == Tunar + 2) // Cores
{
if (response) {
if (listitem == 0) // Preto
{
ChangeVehicleColor(car, 0, 0);
}
if (listitem == 1) // Branco
{
ChangeVehicleColor(car, 1, 1);
}
if (listitem == 2) // Azul Escuro
{
ChangeVehicleColor(car, 425, 425);
}
if (listitem == 3) // Azul Claro
{
ChangeVehicleColor(car, 2, 2);
}
if (listitem == 4) // Verde
{
ChangeVehicleColor(car, 16, 16);
}
if (listitem == 5) // Vermelho
{
ChangeVehicleColor(car, 3, 3);
}
if (listitem == 6) // Amarelo
{
ChangeVehicleColor(car, 6, 6);
}
if (listitem == 7) // Rosa
{
ChangeVehicleColor(car, 146, 146);
}
if (listitem == 8) // Voltar
{
ShowPlayerDialog(playerid, Tunar, DIALOG_STYLE_LIST, "{F63D00}# {FFFFFF}Tunar Menu", "Rodas\nCores\nPaintjobs", "Ok", "Cancelar");
}
}
return 1;
}
if (dialogid == Tunar + 3) // Spoilers
{
if (response) {
if (listitem == 0) // Estilo 1
{
AddVehicleComponent(car,1147); //elegy
AddVehicleComponent(car,1158);
}
if (listitem == 1) // Voltar
{
ShowPlayerDialog(playerid, Tunar, DIALOG_STYLE_LIST, "{F63D00}# {FFFFFF}Tunar Menu", "Rodas\nCores\nPaintjobs", "Ok", "Cancelar");
}
}
}
if (dialogid == Tunar + 4) // Paintjobs
{
if (response) {
if (listitem == 0) // Estilo 1
{
ChangeVehiclePaintjob(car, 0);
}
if (listitem == 1) // Estilo 2
{
ChangeVehiclePaintjob(car, 1);
}
if (listitem == 2) // Estilo 3
{
ChangeVehiclePaintjob(car, 2);
}
if (listitem == 4) // Voltar
{
ShowPlayerDialog(playerid, Tunar, DIALOG_STYLE_LIST, "{F63D00}# {FFFFFF}Tunar Menu", "Rodas\nCores\nPaintjobs\nSuspensгo", "Ok", "Cancelar");
}
}
}
return 1;
}