Jб coloquei os IDs da dialog em um numero que nгo tem na minha GM e jб tirei todos os FS pra ver se era alguma incompatibilidade com outro FS.
Tem que trocar em mais algum lugar as dialogs alem dessa parte? PS: Nгo tem #define
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 6319)
{
if(response == 1)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid,6320,DIALOG_STYLE_MSGBOX,"Concessionбria","Tem certeza que deseja vender seu carro?","Sim","Nгo");
}
if(listitem == 1)
{
new textdialog[3000];
strins(textdialog,"Bravura\n",strlen(textdialog)); //401
strins(textdialog,"Buffalo\n",strlen(textdialog)); //402
strins(textdialog,"Perenniel\n",strlen(textdialog)); //404
strins(textdialog,"Sentinel\n",strlen(textdialog)); //405
strins(textdialog,"Limosine\n",strlen(textdialog)); //409
strins(textdialog,"Manana\n",strlen(textdialog)); //410
strins(textdialog,"Voodoo\n",strlen(textdialog)); //412
strins(textdialog,"Cheetah\n",strlen(textdialog)); //415
strins(textdialog,"Moonbeam\n",strlen(textdialog)); //418
strins(textdialog,"Esperanto\n",strlen(textdialog)); //419
strins(textdialog,"Washington\n",strlen(textdialog)); //421
strins(textdialog,"Premier\n",strlen(textdialog)); //426
strins(textdialog,"Banshee\n",strlen(textdialog)); //429
strins(textdialog,"Hotknife\n",strlen(textdialog)); //434
strins(textdialog,"Previon\n",strlen(textdialog)); //436
strins(textdialog,"Stallion\n",strlen(textdialog)); //439
strins(textdialog,"Romero\n",strlen(textdialog)); //442
strins(textdialog,"Admiral\n",strlen(textdialog)); //445
strins(textdialog,"Turismo\n",strlen(textdialog)); //451
strins(textdialog,"Solair\n",strlen(textdialog)); //458
strins(textdialog,"Glendale\n",strlen(textdialog)); //466
strins(textdialog,"Oceanic\n",strlen(textdialog)); //467
strins(textdialog,"Hermes\n",strlen(textdialog)); //474
strins(textdialog,"Sabre\n",strlen(textdialog)); //475
strins(textdialog,"ZR-350\n",strlen(textdialog)); //477
strins(textdialog,"Regina\n",strlen(textdialog)); //479
strins(textdialog,"Comet\n",strlen(textdialog)); //480
strins(textdialog,"Camper\n",strlen(textdialog)); //483
strins(textdialog,"Virgo\n",strlen(textdialog)); //491
strins(textdialog,"Greenwood\n",strlen(textdialog)); //492
strins(textdialog,"Blista Compact\n",strlen(textdialog)); //496
strins(textdialog,"Super GT\n",strlen(textdialog)); //506
strins(textdialog,"Elegant\n",strlen(textdialog)); //507
strins(textdialog,"Nebula\n",strlen(textdialog)); //516
strins(textdialog,"Majestic\n",strlen(textdialog)); //517
strins(textdialog,"Buccaneer\n",strlen(textdialog)); //518
strins(textdialog,"Fortune\n",strlen(textdialog)); //526
strins(textdialog,"Cadrona\n",strlen(textdialog)); //527
strins(textdialog,"Willard\n",strlen(textdialog)); //529
strins(textdialog,"Feltzer\n",strlen(textdialog)); //533
strins(textdialog,"Remington\n",strlen(textdialog)); //534
strins(textdialog,"Slamvan\n",strlen(textdialog)); //535
strins(textdialog,"Blade\n",strlen(textdialog)); //536
strins(textdialog,"Vincent\n",strlen(textdialog)); //540
strins(textdialog,"Bullet\n",strlen(textdialog)); //541
strins(textdialog,"Clover\n",strlen(textdialog)); //542
strins(textdialog,"Hustler\n",strlen(textdialog)); //545
strins(textdialog,"Intruder\n",strlen(textdialog)); //546
strins(textdialog,"Primo\n",strlen(textdialog)); //547
strins(textdialog,"Tampa\n",strlen(textdialog)); //549
strins(textdialog,"Sunrise\n",strlen(textdialog)); //550
strins(textdialog,"Merit\n",strlen(textdialog)); //551
strins(textdialog,"Windsor\n",strlen(textdialog)); //555
strins(textdialog,"Uranus\n",strlen(textdialog)); //558
strins(textdialog,"Jester\n",strlen(textdialog)); //559
strins(textdialog,"Sultan\n",strlen(textdialog)); //560
strins(textdialog,"Stratum\n",strlen(textdialog)); //561
strins(textdialog,"Elegy\n",strlen(textdialog)); //562
strins(textdialog,"Flash\n",strlen(textdialog)); //565
strins(textdialog,"Tahoma\n",strlen(textdialog)); //566
strins(textdialog,"Savanna\n",strlen(textdialog)); //567
strins(textdialog,"Broadway\n",strlen(textdialog)); //575
strins(textdialog,"Tornado\n",strlen(textdialog)); //576
strins(textdialog,"Stafford\n",strlen(textdialog)); //580
strins(textdialog,"Emperor\n",strlen(textdialog)); //585
strins(textdialog,"Euros\n",strlen(textdialog)); //587
strins(textdialog,"Club\n",strlen(textdialog)); //589
strins(textdialog,"Alpha\n",strlen(textdialog)); //602
strins(textdialog,"Phoenix",strlen(textdialog)); //603
ShowPlayerDialog(playerid,6321,DIALOG_STYLE_LIST,"Qual carro vocк deseja comprar?",textdialog,"Selecionar","Cancelar");
}
}
else
{
//Tudo que vai acontecer no botгo direito.
}
}
if(dialogid == 6320)
{
if(response == 1)
{
new PlayerNick[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlayerNick,sizeof(PlayerNick));
CarregarDono(playerid);
new arquivo[256];
format(arquivo, sizeof(arquivo), "/Concessionaria/Donos/%s.ini",PlayerNick);
new carro = Dono[playerid][dChave];
if(dini_Exists(arquivo))
{
strmid(Carro[carro][cDono], "Ninguem", 0, strlen("Ninguem"), 256);
Carro[carro][cCarroON] = 0;
Carro[carro][cModelo] = 0;
Carro[carro][cSpawnX] = 0.000000;
Carro[carro][cSpawnY] = 0.000000;
Carro[carro][cSpawnZ] = 0.000000;
Carro[carro][cAngulo] = 0.000000;
Carro[carro][cCorUm] = 0;
Carro[carro][cCorDois] = 0;
dini_Remove(arquivo);
DestroyVehicle(cCarro[carro]);
SalvarCarro(carro);
SendClientMessage(playerid, Azul, "[CONCESSIONБRIA] Carro vendido com sucesso!");
}
else
{
SendClientMessage(playerid, Branco, "[CONCESSIONБRIA] Vocк nгo tem um carro!");
}
}
else
{
SendClientMessage(playerid, Branco, "[CONCESSIONБRIA] Venda do carro cancelada!");
}
}
if(dialogid == 6321)
{
if(response == 1)
{
if(listitem == 0){ ModeloCarro[playerid] = 401; PrecoCarro(playerid); }
if(listitem == 1){ ModeloCarro[playerid] = 402; PrecoCarro(playerid); }
if(listitem == 2){ ModeloCarro[playerid] = 404; PrecoCarro(playerid); }
if(listitem == 3){ ModeloCarro[playerid] = 405; PrecoCarro(playerid); }
if(listitem == 4){ ModeloCarro[playerid] = 409; PrecoCarro(playerid); }
if(listitem == 5){ ModeloCarro[playerid] = 410; PrecoCarro(playerid); }
if(listitem == 6){ ModeloCarro[playerid] = 412; PrecoCarro(playerid); }
if(listitem == 7){ ModeloCarro[playerid] = 415; PrecoCarro(playerid); }
if(listitem == 8){ ModeloCarro[playerid] = 418; PrecoCarro(playerid); }
if(listitem == 9){ ModeloCarro[playerid] = 419; PrecoCarro(playerid); }
if(listitem == 10){ ModeloCarro[playerid] = 421; PrecoCarro(playerid); }
if(listitem == 11){ ModeloCarro[playerid] = 426; PrecoCarro(playerid); }
if(listitem == 12){ ModeloCarro[playerid] = 429; PrecoCarro(playerid); }
if(listitem == 13){ ModeloCarro[playerid] = 434; PrecoCarro(playerid); }
if(listitem == 14){ ModeloCarro[playerid] = 436; PrecoCarro(playerid); }
if(listitem == 15){ ModeloCarro[playerid] = 439; PrecoCarro(playerid); }
if(listitem == 16){ ModeloCarro[playerid] = 442; PrecoCarro(playerid); }
if(listitem == 17){ ModeloCarro[playerid] = 445; PrecoCarro(playerid); }
if(listitem == 18){ ModeloCarro[playerid] = 451; PrecoCarro(playerid); }
if(listitem == 19){ ModeloCarro[playerid] = 458; PrecoCarro(playerid); }
if(listitem == 20){ ModeloCarro[playerid] = 466; PrecoCarro(playerid); }
if(listitem == 21){ ModeloCarro[playerid] = 467; PrecoCarro(playerid); }
if(listitem == 22){ ModeloCarro[playerid] = 474; PrecoCarro(playerid); }
if(listitem == 23){ ModeloCarro[playerid] = 475; PrecoCarro(playerid); }
if(listitem == 24){ ModeloCarro[playerid] = 477; PrecoCarro(playerid); }
if(listitem == 25){ ModeloCarro[playerid] = 479; PrecoCarro(playerid); }
if(listitem == 26){ ModeloCarro[playerid] = 480; PrecoCarro(playerid); }
if(listitem == 27){ ModeloCarro[playerid] = 483; PrecoCarro(playerid); }
if(listitem == 28){ ModeloCarro[playerid] = 491; PrecoCarro(playerid); }
if(listitem == 29){ ModeloCarro[playerid] = 492; PrecoCarro(playerid); }
if(listitem == 30){ ModeloCarro[playerid] = 496; PrecoCarro(playerid); }
if(listitem == 31){ ModeloCarro[playerid] = 506; PrecoCarro(playerid); }
if(listitem == 32){ ModeloCarro[playerid] = 507; PrecoCarro(playerid); }
if(listitem == 33){ ModeloCarro[playerid] = 516; PrecoCarro(playerid); }
if(listitem == 34){ ModeloCarro[playerid] = 517; PrecoCarro(playerid); }
if(listitem == 35){ ModeloCarro[playerid] = 518; PrecoCarro(playerid); }
if(listitem == 36){ ModeloCarro[playerid] = 526; PrecoCarro(playerid); }
if(listitem == 37){ ModeloCarro[playerid] = 527; PrecoCarro(playerid); }
if(listitem == 38){ ModeloCarro[playerid] = 529; PrecoCarro(playerid); }
if(listitem == 39){ ModeloCarro[playerid] = 533; PrecoCarro(playerid); }
if(listitem == 40){ ModeloCarro[playerid] = 534; PrecoCarro(playerid); }
if(listitem == 41){ ModeloCarro[playerid] = 535; PrecoCarro(playerid); }
if(listitem == 42){ ModeloCarro[playerid] = 536; PrecoCarro(playerid); }
if(listitem == 43){ ModeloCarro[playerid] = 540; PrecoCarro(playerid); }
if(listitem == 44){ ModeloCarro[playerid] = 541; PrecoCarro(playerid); }
if(listitem == 45){ ModeloCarro[playerid] = 542; PrecoCarro(playerid); }
if(listitem == 46){ ModeloCarro[playerid] = 545; PrecoCarro(playerid); }
if(listitem == 47){ ModeloCarro[playerid] = 546; PrecoCarro(playerid); }
if(listitem == 48){ ModeloCarro[playerid] = 547; PrecoCarro(playerid); }
if(listitem == 49){ ModeloCarro[playerid] = 549; PrecoCarro(playerid); }
if(listitem == 50){ ModeloCarro[playerid] = 550; PrecoCarro(playerid); }
if(listitem == 51){ ModeloCarro[playerid] = 551; PrecoCarro(playerid); }
if(listitem == 52){ ModeloCarro[playerid] = 555; PrecoCarro(playerid); }
if(listitem == 53){ ModeloCarro[playerid] = 558; PrecoCarro(playerid); }
if(listitem == 54){ ModeloCarro[playerid] = 559; PrecoCarro(playerid); }
if(listitem == 55){ ModeloCarro[playerid] = 560; PrecoCarro(playerid); }
if(listitem == 56){ ModeloCarro[playerid] = 561; PrecoCarro(playerid); }
if(listitem == 57){ ModeloCarro[playerid] = 562; PrecoCarro(playerid); }
if(listitem == 58){ ModeloCarro[playerid] = 565; PrecoCarro(playerid); }
if(listitem == 59){ ModeloCarro[playerid] = 566; PrecoCarro(playerid); }
if(listitem == 60){ ModeloCarro[playerid] = 567; PrecoCarro(playerid); }
if(listitem == 61){ ModeloCarro[playerid] = 575; PrecoCarro(playerid); }
if(listitem == 62){ ModeloCarro[playerid] = 576; PrecoCarro(playerid); }
if(listitem == 63){ ModeloCarro[playerid] = 580; PrecoCarro(playerid); }
if(listitem == 64){ ModeloCarro[playerid] = 585; PrecoCarro(playerid); }
if(listitem == 65){ ModeloCarro[playerid] = 587; PrecoCarro(playerid); }
if(listitem == 66){ ModeloCarro[playerid] = 589; PrecoCarro(playerid); }
if(listitem == 67){ ModeloCarro[playerid] = 602; PrecoCarro(playerid); }
if(listitem == 68){ ModeloCarro[playerid] = 603; PrecoCarro(playerid); }
}
else
{
SendClientMessage(playerid, Branco, "[CONCESSIONБRIA] Compra de carro cancelada.");
}
}
return 0;
}