Код:
if(dialogid == 179)// DealerShip
{
if(!response)
{
SendClientMessage(playerid, -1, "Ai inchis meniul cu optiuni!");
return 1; // We processed it
}
switch(listitem)
{
case 0:
{
new string2[2056];
new coordsstring[2056];
format(string2, sizeof(string2), "1. Regina: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[479],vehSlots[479]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "2. Perenniel: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[404],vehSlots[404]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "3. Bravura: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[401],vehSlots[401]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "4. Sentinel: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[405],vehSlots[405]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "5. Manana: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[410],vehSlots[410]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "6.Willard : [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[529],vehSlots[529]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "7.Premier: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[426],vehSlots[426]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "8.Previon: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[436],vehSlots[436]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "9.Admiral: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[445],vehSlots[445]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "10.Solair: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[458],vehSlots[458]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "11.Mese: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[500],vehSlots[500]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "12.Sandking: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[495],vehSlots[495]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "13.Blista-Compact: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[496],vehSlots[496]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "14.Slamvan: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[535],vehSlots[535]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "15.Flash: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[565],vehSlots[565]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "16.Savanna: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[567],vehSlots[567]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "17.Tornado: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[576],vehSlots[576]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "18.Sultan: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[560],vehSlots[560]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "19.Elegy: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[562],vehSlots[562]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "20.Buffalo: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[402],vehSlots[402]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "21.Alpha: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[602],vehSlots[602]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "22.Banshee: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[429],vehSlots[429]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "23.Bullet: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[541],vehSlots[541]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "24.Cheetah: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[415],vehSlots[415]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "25.Hotring Racer: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[494],vehSlots[494]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "26.Infernus: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[411],vehSlots[411]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "27.Jester: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[559],vehSlots[559]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "28.Phoenix: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[603],vehSlots[603]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "29.Super-GT: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[506],vehSlots[506]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "30.Turimso: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[451],vehSlots[451]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "31.ZR-350: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[477],vehSlots[477]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "32.Uranus: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[558],vehSlots[558]);
strcat(string2,coordsstring);
ShowPlayerDialog (playerid, 180 ,DIALOG_STYLE_LIST, "{C00000}D{FFFFFF}ealership - Automobile" , string2, "Ok" , "Cancel" );
}
case 1:
{
new string2[512];
new coordsstring[2056];
format(string2, sizeof(string2), "1. Wayfarer: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[586],vehSlots[586]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "2. FCR-900: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[521],vehSlots[521]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "3. Freeway: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[463],vehSlots[463]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "4. NRG-500: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[522],vehSlots[522]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "5. Faggio: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[562],vehSlots[562]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "6. PCJ-600: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n", vehPrice[461],vehSlots[461]);
strcat(string2,coordsstring);
ShowPlayerDialog (playerid, 181 ,DIALOG_STYLE_LIST, "{C00000}D{FFFFFF}ealership - Mototciclete" , string2, "Ok" , "Cancel" );
}
case 2:
{
new string2[512];
new coordsstring[2056];
format(string2, sizeof(string2), "1. Squallo: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[446],vehSlots[446]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "2. Speeder: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[452],vehSlots[452]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "3. Reefer: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[453],vehSlots[453]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "4. Dinghy: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[473],vehSlots[473]);
strcat(string2,coordsstring);
ShowPlayerDialog (playerid, 182 ,DIALOG_STYLE_LIST, "{C00000}D{FFFFFF}ealership - Barci" , string2, "Ok" , "Cancel" );
}
case 3:
{
new string2[512];
new coordsstring[2056];
format(string2, sizeof(string2), "1.Maverick: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[487],vehSlots[487]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "2. Sparrow: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[447],vehSlots[447]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "3. Cropduster: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[593],vehSlots[593]);
strcat(string2,coordsstring);
format(coordsstring, sizeof(coordsstring), "4. Dodo: [Pret: {FF0000}%d${FFFFFF}] [Stock: {FF0000}%d{FFFFFF}]\n",vehPrice[434],vehSlots[434]);
strcat(string2,coordsstring);
ShowPlayerDialog (playerid, 183 ,DIALOG_STYLE_LIST, "{C00000}D{FFFFFF}ealership - Aeronave" , string2, "Ok" , "Cancel" );
}
}
}
if((dialogid == 180) || (dialogid == 181) || (dialogid == 182) || (dialogid == 183))
{
if(!response)
{
SendClientMessage(playerid, -1, "Ai inchis meniul cu optiuni!");
return 1; // We processed it
}
if(dialogid == 180)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, -1, "Iti trebuie level 3 pentru a utiliza aceasta comanda (/dealership)!");
return 1;
}
if(PlayerInfo[playerid][pCar1] != 0 && PlayerInfo[playerid][pDonateRank] == 0)
{
SendClientMessage(playerid, -1, "Detii deja un vehicul personal!");
return 1;
}
switch(listitem)
{
case 0:
{
SetVehicleModel(479, vehPrice[479]);
}
case 1:
{
SetVehicleModel(404, vehPrice[404]);
}
case 2:
{
SetVehicleModel(401, vehPrice[401]);
}
case 3:
{
SetVehicleModel(405, vehPrice[405]);
}
case 4:
{
SetVehicleModel(410, vehPrice[410]);
}
case 5:
{
SetVehicleModel(529, vehPrice[529]);
}
case 6:
{
SetVehicleModel(426, vehPrice[426]);
}
case 7:
{
SetVehicleModel(436, vehPrice[436]);
}
case 8:
{
SetVehicleModel(445, vehPrice[445]);
}
case 9:
{
SetVehicleModel(458, vehPrice[458]);
}
case 10:
{
SetVehicleModel(500, vehPrice[500]);
}
case 11:
{
SetVehicleModel(495, vehPrice[495]);
}
case 12:
{
SetVehicleModel(496, vehPrice[496]);
}
case 13:
{
SetVehicleModel(535, vehPrice[535]);
}
case 14:
{
SetVehicleModel(565, vehPrice[565]);
}
case 15:
{
SetVehicleModel(567, vehPrice[567]);
}
case 16:
{
SetVehicleModel(576, vehPrice[576]);
}
case 17:
{
SetVehicleModel(560, vehPrice[560]);
}
case 18:
{
SetVehicleModel(562, vehPrice[562]);
}
case 19:
{
SetVehicleModel(402, vehPrice[402]);
}
case 20:
{
SetVehicleModel(602, vehPrice[602]);
}
case 21:
{
SetVehicleModel(429, vehPrice[429]);
}
case 22:
{
SetVehicleModel(541, vehPrice[541]);
}
case 23:
{
SetVehicleModel(415, vehPrice[415]);
}
case 24:
{
SetVehicleModel(494, vehPrice[494]);
}
case 25:
{
SetVehicleModel(411, vehPrice[411]);
}
case 26:
{
SetVehicleModel(559, vehPrice[559]);
}
case 27:
{
SetVehicleModel(603, vehPrice[603]);
}
case 28:
{
SetVehicleModel(506, vehPrice[506]);
}
case 29:
{
SetVehicleModel(451, vehPrice[451]);
}
case 30:
{
SetVehicleModel(477, vehPrice[477]);
}
case 31:
{
SetVehicleModel(558, vehPrice[558]);
}
}
}
else if(dialogid == 181)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, -1, "Iti trebuie level 3 pentru a utiliza aceasta comanda (/dealership)!");
return 1;
}
if(PlayerInfo[playerid][pCar2] != 0)
{
SendClientMessage(playerid, -1, "Detii deja o motocicleta personala!");
return 1;
}
switch(listitem)
{
case 0:
{
SetVehicleModel(586, vehPrice[586]);
}
case 1:
{
SetVehicleModel(521, vehPrice[521]);
}
case 2:
{
SetVehicleModel(463, vehPrice[463]);
}
case 3:
{
SetVehicleModel(522, vehPrice[522]);
}
case 4:
{
SetVehicleModel(462, vehPrice[462]);
}
case 5:
{
SetVehicleModel(461, vehPrice[461]);
}
}
}
else if(dialogid == 182)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, -1, "Iti trebuie level 3 pentru a utiliza aceasta comanda (/dealership)!");
return 1;
}
if(PlayerInfo[playerid][pCar3] != 0)
{
SendClientMessage(playerid, -1, "Detii deja o barca personala!");
return 1;
}
switch(listitem)
{
case 0:
{
SetVehicleModel(446, vehPrice[446]);
}
case 1:
{
SetVehicleModel(452, vehPrice[452]);
}
case 2:
{
SetVehicleModel(453, vehPrice[453]);
}
case 3:
{
SetVehicleModel(473, vehPrice[473]);
}
}
}
else if(dialogid == 183)
{
if(PlayerInfo[playerid][pLevel] < 3)
{
SendClientMessage(playerid, -1, "Iti trebuie level 3 pentru a utiliza aceasta comanda (/dealership)!");
return 1;
}
if(PlayerInfo[playerid][pCar3] != 999)
{
SendClientMessage(playerid, -1, "Detii deja un avion personal!");
return 1;
}
switch(listitem)
{
case 0:
{
SetVehicleModel(446, vehPrice[446]);
}
case 1:
{
SetVehicleModel(452, vehPrice[452]);
}
case 2:
{
SetVehicleModel(453, vehPrice[453]);
}
case 3:
{
SetVehicleModel(473, vehPrice[473]);
}
}
}
if(GetPlayerCash(playerid) > VehDSpret[playerid])
{
new CheckStock[128];
new result;
new numarStoc;
format(CheckStock,sizeof(CheckStock),"SELECT stoc FROM stocds WHERE modelid='%i'", VehDSmod[playerid]);
result = mysql_query(CheckStock);
mysql_store_result();
numarStoc = mysql_fetch_int(result);
mysql_free_result();
printf("%i", numarStoc);
if(numarStoc >= 1)
{
numarStoc--;
format(CheckStock,sizeof(CheckStock),"UPDATE stocds SET stoc='%i' WHERE modelid='%i'", numarStoc, VehDSmod[playerid]);
mysql_query(CheckStock);
numarStoc = 0;
new idd;
mysql_query("SELECT * FROM `cars`");
mysql_store_result();
idd = mysql_num_rows()+1;
mysql_free_result();
format(string, sizeof(string), "%s",ArIsim[VehDSmod[playerid]-400]);
strmid(vInfo[idd][vOwner], sendername, 0, strlen(sendername), 999);
new rand;
rand = random(sizeof(VehicleSpawns));
new rand1;
new rand2;
rand1 = random(sizeof(FlySpawns));
rand2 = random(sizeof(BoatSpawns));
if(dialogid == 180)
{
vInfo[idd][vCariD] = VehDSmod[playerid];
vInfo[idd][vPrice] = VehDSpret[playerid];
vInfo[idd][vPosX] = VehicleSpawns[rand][0];
vInfo[idd][vPosY] = VehicleSpawns[rand][1];
vInfo[idd][vPosZ] = VehicleSpawns[rand][2];
}
if(dialogid == 181)
{
vInfo[idd][vCariD] = VehDSmod[playerid];
vInfo[idd][vPrice] = VehDSpret[playerid];
vInfo[idd][vPosX] = VehicleSpawns[rand][0];
vInfo[idd][vPosY] = VehicleSpawns[rand][1];
vInfo[idd][vPosZ] = VehicleSpawns[rand][2];
}
if(dialogid == 182)
{
vInfo[idd][vCariD] = VehDSmod[playerid];
vInfo[idd][vPrice] = VehDSpret[playerid];
vInfo[idd][vPosX] = BoatSpawns[rand2][0];
vInfo[idd][vPosY] = BoatSpawns[rand2][1];
vInfo[idd][vPosZ] = BoatSpawns[rand2][2];
}
if(dialogid == 183)
{
vInfo[idd][vCariD] = VehDSmod[playerid];
vInfo[idd][vPrice] = VehDSpret[playerid];
vInfo[idd][vPosX] = FlySpawns[rand1][0];
vInfo[idd][vPosY] = FlySpawns[rand1][1];
vInfo[idd][vPosZ] = FlySpawns[rand1][2];
}
vInfo[idd][vOwner] = 1;
vInfo[idd][vVechime] = 0;
AddStaticVehicle(vInfo[idd][vCariD],vInfo[idd][vPosX],vInfo[idd][vPosY],vInfo[idd][vPosZ],0,0,0);
format(string, sizeof(string),"INSERT INTO cars (id, Model) VALUES (%d, %d)", idd, vInfo[idd][vCariD]);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Locationx='%f' WHERE id=%d", vInfo[idd][vPosX], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Locationy='%f' WHERE id=%d", vInfo[idd][vPosY], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Locationz='%f' WHERE id=%d", vInfo[idd][vPosZ], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Angle='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET SaLocationx='%f' WHERE id=%d", vInfo[idd][vPosX], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET SaLocationy='%f' WHERE id=%d", vInfo[idd][vPosY], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET SaLocationz='%f' WHERE id=%d", vInfo[idd][vPosZ], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET SaAngle='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET ColorOne='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET ColorTwo='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Value='%d' WHERE id=%d", vInfo[idd][vPrice], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET License='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Owned='1' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Owner='%s' WHERE id=%d", vInfo[idd][vOwner], idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Lockk='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Exploded='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Num='BLAZZED' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component00='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component01='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component02='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component03='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component04='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component05='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component06='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component07='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component08='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component09='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component10='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component11='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component12='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET Component13='0' WHERE id=%d", idd);
mysql_query(string);
format(string, sizeof(string), "UPDATE cars SET KM='0' WHERE id=%d", idd);
mysql_query(string);
if(dialogid == 180 && PlayerInfo[playerid][pCar1] == 999)
{
PlayerInfo[playerid][pCar1] = idd;
format(string, sizeof(string), "UPDATE players SET Car='%d' WHERE id=%d", PlayerInfo[playerid][pCar1], PlayerInfo[playerid][pSQLID]);
mysql_query(string);
GivePlayerMoneyEx(playerid, - VehDSpret[playerid]);
new string1[128];
format(string1, sizeof(string1), "Felicitari! Ai achizitionat un vehicul! Valoare: %d | slot #1]!", vInfo[idd][vPrice]);
SendClientMessage(playerid, -1, string1);
SendClientMessage(playerid, -1, "Tasteaza /vinfo pentru a afla locatia noului tau vehicul!");
return 1;
}
else if(dialogid == 181)
{
PlayerInfo[playerid][pCar2] = idd;
format(string, sizeof(string), "UPDATE players SET Car2='%d' WHERE id=%d", PlayerInfo[playerid][pCar2], PlayerInfo[playerid][pSQLID]);
mysql_query(string);
GivePlayerMoneyEx(playerid, - VehDSpret[playerid]);
new string1[128];
format(string1, sizeof(string1), "Felicitari! Ai achizitionat o motocicleta! Valoare: %d | slot #2]!", vInfo[idd][vPrice]);
SendClientMessage(playerid, -1, string1);
SendClientMessage(playerid, -1, "Tasteaza /vinfo pentru a afla locatia noului tau vehicul!");
return 1;
}
else if(dialogid == 182)
{
PlayerInfo[playerid][pCar3] = idd;
format(string, sizeof(string), "UPDATE players SET Car3='%d' WHERE id=%d", PlayerInfo[playerid][pCar3], PlayerInfo[playerid][pSQLID]);
mysql_query(string);
GivePlayerMoneyEx(playerid, - VehDSpret[playerid]);
new string1[128];
format(string1, sizeof(string1), "Felicitari! Ai achizitionat o barca! Valoare: %d | slot #3]!", vInfo[idd][vPrice]);
SendClientMessage(playerid, -1, string1);
SendClientMessage(playerid, -1, "Tasteaza /vinfo pentru a afla locatia noului tau vehicul!");
return 1;
}
else if(dialogid == 183)
{
PlayerInfo[playerid][pCar3] = idd;
format(string, sizeof(string), "UPDATE players SET Car3='%d' WHERE id=%d", PlayerInfo[playerid][pCar3], PlayerInfo[playerid][pSQLID]);
mysql_query(string);
GivePlayerMoneyEx(playerid, - VehDSpret[playerid]);
new string1[128];
format(string1, sizeof(string1), "Felicitari! Ai achizitionat un avion/elicopter! Valoare: %d | slot #4]!", vInfo[idd][vPrice]);
SendClientMessage(playerid, -1, string1);
SendClientMessage(playerid, -1, "Tasteaza /vinfo pentru a afla locatia noului tau vehicul!");
return 1;
}
}
else return SendClientMessage(playerid,COLOR_WHITE,"Aceasta masina nu mai este in stoc.");
}
else
{
SendClientMessage(playerid, -1, "Nu ai suficienti bani.");
return 1;
}
}