I rebuilt the dialogues from the ds but now I no longer dialog appears with a list of cars in that area ....
Код:
if(dialogid == 2)
{
if(!response)
{
if(gPlayerLogged[playerid] != 0)
{
if(UsingDealership[playerid] == 1)
{
new buffer[256], szAREA[3096];
szAREA = "";
format(buffer,sizeof(buffer),"Vehicul\tPret\tStoc\nBravura\t$5000\t%d\nManana\t$5000\t%d\nPrevion\t$5000\t%d\nStallion\t$5000\t%d\nMajestic\t$1000\t%d",vehSlots[401],vehSlots[410],vehSlots[436],vehSlots[439],vehSlots[517]);
strcat(szAREA,buffer);
format(buffer,sizeof(buffer),"\nFortune\t$1000\t%d\nClub\t$1000\t%d\nAlpha\t$1000\t%d\nTahoma\t$1000\t%d\nSentine\t$1000\t%d\nBlista Compact\t$1000\t%d\n",vehSlots[526],vehSlots[589],vehSlots[602],vehSlots[566],vehSlots[405],vehSlots[496]);
strcat(szAREA,buffer);
format(buffer,sizeof(buffer),"Premier\t$1000\t%d\nHuntley\t$1000\t%d\nSabre\t$1000\t%d\nIntruder\t$1000\t%d\nWilldiard\t$1000\t%d\nSunrise\t$1000\t%d",vehSlots[426],vehSlots[579],vehSlots[475],vehSlots[546],vehSlots[529],vehSlots[550]);
strcat(szAREA,buffer);
format(buffer,sizeof(buffer),"\nVincent\t$1000\t%d\nOceanic\t$1000\t%d\nGlendale\t$1000\t%d\nGreenwood\t$1000\t%d\nEsperanto\t$1000\t%d\nSandking\t$1000\t%d",vehSlots[540],vehSlots[467],vehSlots[466],vehSlots[492],vehSlots[419],vehSlots[495]);
strcat(szAREA,buffer);
format(buffer,sizeof(buffer),"\nFeltzer\t$1000\t%d\nTampa\t$1000\t%d\nStafford\t$1000\t%d\nPicador\t$1000\t%d\nWashington\t$1000\t%d\nAdmiral\t$1000\t%d",vehSlots[533],vehSlots[549],vehSlots[580],vehSlots[600],vehSlots[421],vehSlots[445]);
strcat(szAREA,buffer);
format(buffer,sizeof(buffer),"\nMerit\t$1000\t%d\nEmperor\t$1000\t%d\nLandstalker\t$1000\t%d\nWindsor\t$1000\t%d\nClover\t$1000\t%d\nBuffalo\t$1000\t%d",vehSlots[551],vehSlots[585],vehSlots[400],vehSlots[555],vehSlots[542],vehSlots[402]);
strcat(szAREA,buffer);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_TABLIST_HEADERS, "Dealership Masini Sedan", buffer, "Alege", "Iesi");
}
else if(UsingDealership[playerid] == 2)
{
new dialogformatmoto[256];
format(dialogformatmoto,sizeof(dialogformatmoto),"Vehicul\tPret\tStoc\nPCJ-600\t$5000\t%d\nFaggio\t$5000\t%d\nSanchez\t$5000\t%d\nBMX\t$5000\t%d\nMountain Bike\t$1000\t%d\nFCR-900\t$1000\t%d\nBF-400\t$1000\t%d\nWayfarer-900\t$1000\t%d\nNRG-500\t$1000\t%d",vehSlots[461],vehSlots[462],vehSlots[468],vehSlots[481],vehSlots[510],vehSlots[521],vehSlots[581],vehSlots[586],vehSlots[522]);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_TABLIST_HEADERS, "Dealership Motociclete/Biciclete", dialogformatmoto, "Alege", "Iesi");
}
else if(UsingDealership[playerid] == 3)
{
new dialogformatepica[256];
format(dialogformatepica,sizeof(dialogformatepica),"Vehicul\tPret\tStoc\nVoodoo\t$5000\t%d\nRemington\t$5000\t%d\nSlamvan\t$5000\t%d\nBlade\t$5000\t%d\nSavanna\t$1000\t%d\nBroadway\t$1000\t%d\nTornado\t$1000\t%d",vehSlots[412],vehSlots[534],vehSlots[535],vehSlots[536],vehSlots[567],vehSlots[575],vehSlots[576]);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_TABLIST_HEADERS, "Dealership Motociclete/Biciclete", dialogformatepica, "Alege", "Iesi");
}
else if(UsingDealership[playerid] == 4)
{
new dialogformatbarci[256];
format(dialogformatbarci,sizeof(dialogformatbarci),"Vehicul\tPret\tStoc\nSqualo\t$5000\t%d\nSpeeder\t$5000\t%d\nTropic\t$5000\t%d\nDinghy\t$5000\t%d\nJetMax\t$1000\t%d",vehSlots[446],vehSlots[452],vehSlots[454],vehSlots[473],vehSlots[473]);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_TABLIST_HEADERS, "Dealership Barci", dialogformatbarci, "Alege", "Iesi");
}
else if(UsingDealership[playerid] == 5)
{
new dialogformatavioane[256];
format(dialogformatavioane,sizeof(dialogformatavioane),"Vehicul\tPret\tStoc\nDodo\t$5000\t%d\nStuntplane\t$5000\t%d\nMaverick\t$5000\t%d\nSparrow\t$5000\t%d",vehSlots[593],vehSlots[513],vehSlots[487],vehSlots[469]);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_TABLIST_HEADERS, "Dealership Avioane/Elicoptere", dialogformatavioane, "Alege", "Iesi");
}
else if(UsingDealership[playerid] == 6)
{
new dialogformatlux[256], szAREA[3096];
szAREA = "";
format(dialogformatlux,sizeof(dialogformatlux),"Vehicul\tPret\tStoc\nBullet\t$5000\t%d\nInfernus\t$5000\t%d\nTurismo\t$5000\t%d\nCheetah\t$5000\t%d\nBanshee\t$1000\t%d",vehSlots[541],vehSlots[411],vehSlots[451],vehSlots[415],vehSlots[429]);
strcat(szAREA,dialogformatlux);
format(dialogformatlux,sizeof(dialogformatlux),"\nSultan\t$1000\t%d\nJester\t$1000\t%d\nElegy\t$1000\t%d\nComet\t$1000\t%d\nFlash\t$1000\t%d\nSuper GT\t$1000\t%d\n",vehSlots[560],vehSlots[559],vehSlots[562],vehSlots[480],vehSlots[565],vehSlots[506]);
strcat(szAREA,dialogformatlux);
format(dialogformatlux,sizeof(dialogformatlux),"ZR-350\t$1000\t%d\nPhoenix\t$1000\t%d\nUranus\t$1000\t%d",vehSlots[477],vehSlots[603],vehSlots[558]);
strcat(szAREA,dialogformatlux);
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_TABLIST_HEADERS, "Dealership Masini de lux", dialogformatlux, "Alege", "Iesi");
}
}
}
else
{
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Dealership","{F6F6F6}Ai iesit din meniu. Vrei sa cumperi acest vehicul? \nDaca da, apasa {00BC00}'Cumpara'{00BC00}.\nAltfel, apasa {00BC00}'Iesi'{00BC00}","Cumpara","Iesi");
return 1;
}
}
Код:
if(IsPlayerConnected(playerid))
{
if (PlayerToPoint(3.0, playerid, 2131.8369,-1150.5486,24.1454))
{
new count = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(20.0, i, -1656.6138,1211.2800,20.8641) && UsingDealership[i] != 0 && GetPlayerVirtualWorld(i) == 10)
{
count ++;
}
}
if(count < 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00BC00}Dealership","{F6F6F6}Esti la intrarea unui {00BC00}dealership{F6F6F6}.\nPentru a continua, apasa 'Ok'.\nAltfel, apasa 'Iesi'","OK","Iesi");
VehPosition[playerid] = 0;
UsingDealership[playerid] = 1;
DealershipTimer[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Ai 3 minute la dispozitie sa-ti alegi un vehicul.");
SetPlayerVirtualWorld(playerid, 10);
}
else SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Reprezentanta auto este deja ocupata cu un client. Te rog incearca din nou peste cateva minute.");
}
if (PlayerToPoint(3.0, playerid, 1410.9225,-1701.1395,13.5395))
{
new count = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(20.0, i, -1951.3833,259.0796,41.0471) && UsingDealership[i] != 0)
{
count ++;
}
}
if(count < 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00BC00}Dealership","{F6F6F6}Esti la intrarea unui {00BC00}dealership{F6F6F6}.\nPentru a continua, apasa 'Ok'.\nAltfel, apasa 'Iesi'","OK","Iesi");
VehPosition[playerid] = 1;
UsingDealership[playerid] = 2;
DealershipTimer[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Ai 3 minute la dispozitie sa-ti alegi un vehicul.");
SetPlayerVirtualWorld(playerid, 10);
}
else SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Reprezentanta auto este deja ocupata cu un client. Te rog incearca din nou peste cateva minute.");
}
if (PlayerToPoint(3.0, playerid, 2751.8899,-1468.2407,30.4531))
{
new count = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(20.0, i, -1656.6138,1211.2800,20.8641) && UsingDealership[i] != 0 && GetPlayerVirtualWorld(i) == 11)
{
count ++;
}
}
if(count < 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00BC00}Dealership","{F6F6F6}Esti la intrarea unui {00BC00}dealership{F6F6F6}.\nPentru a continua, apasa 'Ok'.\nAltfel, apasa 'Iesi'","OK","Iesi");
VehPosition[playerid] = 1;
UsingDealership[playerid] = 3;
DealershipTimer[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Ai 3 minute la dispozitie sa-ti alegi un vehicul.");
SetPlayerVirtualWorld(playerid, 11);
}
else SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Reprezentanta auto este deja ocupata cu un client. Te rog incearca din nou peste cateva minute.");
}
if (PlayerToPoint(3.0, playerid, 370.9933,-2052.3145,8.0156))
{
new count = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(20.0, i, 544.7953,-2497.9021,-0.3487) && UsingDealership[i] != 0 && GetPlayerVirtualWorld(i) == 11)
{
count ++;
}
}
if(count < 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00BC00}Dealership","{F6F6F6}Esti la intrarea unui {00BC00}dealership{F6F6F6}.\nPentru a continua, apasa 'Ok'.\nAltfel, apasa 'Iesi'","OK","Iesi");
VehPosition[playerid] = 1;
UsingDealership[playerid] = 4;
DealershipTimer[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Ai 3 minute la dispozitie sa-ti alegi un vehicul.");
SetPlayerVirtualWorld(playerid, 11);
}
else SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Reprezentanta auto este deja ocupata cu un client. Te rog incearca din nou peste cateva minute.");
}
if (PlayerToPoint(3.0, playerid, 1606.3135,-2432.6738,13.5547))
{
new count = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(20.0, i, 1533.4207,-2627.9856,13.5469) && UsingDealership[i] != 0 && GetPlayerVirtualWorld(i) == 11)
{
count ++;
}
}
if(count < 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00BC00}Dealership","{F6F6F6}Esti la intrarea unui {00BC00}dealership{F6F6F6}.\nPentru a continua, apasa 'Ok'.\nAltfel, apasa 'Iesi'","OK","Iesi");
VehPosition[playerid] = 1;
UsingDealership[playerid] = 5;
DealershipTimer[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Ai 3 minute la dispozitie sa iti alegi un avion.");
SetPlayerVirtualWorld(playerid, 11);
}
else SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Reprezentanta auto este deja ocupata cu un client. Te rog incearca din nou peste cateva minute.");
}
if (PlayerToPoint(3.0, playerid, 1948.2946,2068.7778,11.0610))
{
new count = 0;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerToPoint(20.0, i, -1656.6138,1211.2800,20.8641) && UsingDealership[i] != 0 && GetPlayerVirtualWorld(i) == 12)
{
count ++;
}
}
if(count < 1)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"{00BC00}Dealership","{F6F6F6}Esti la intrarea unui {00BC00}dealership{F6F6F6}.\nPentru a continua, apasa 'Ok'.\nAltfel, apasa 'Iesi'","OK","Iesi");
VehPosition[playerid] = 0;
UsingDealership[playerid] = 6;
DealershipTimer[playerid] = 3;
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Ai 3 minute la dispozitie sa-ti alegi un vehicul.");
SetPlayerVirtualWorld(playerid, 12);
}
else SendClientMessage(playerid, COLOR_WHITE, "{DC0C0C}Dealership: {FFFFFF}Reprezentanta auto este deja ocupata cu un client. Te rog incearca din nou peste cateva minute.");
}
}