14.01.2014, 15:14
pawn Код:
else if(dialogid == 10) // Dealership main
{
if(response)
{
switch(listitem)
{
case 0: SSSShowDialog(playerid, 11); // Bikes
case 1: SSSShowDialog(playerid, 12); // Normal Vehicles
case 2: SSSShowDialog(playerid, 21); // Lowriders
case 3: SSSShowDialog(playerid, 13); // Off-Road Vehicles
case 4: SSSShowDialog(playerid, 14); // Sport Vehicles
}
}
}
else if(dialogid == 11) // Bikes
{
new string[128], carid, price;
if(response)
{
switch(listitem)
{
case 0: {carid = 586; price = 35000;}
case 1: {carid = 462; price = 40000;}
case 2: {carid = 463; price = 80000;}
case 3: {carid = 468; price = 70000;}
case 4: {carid = 471; price = 50000;}
case 5: {carid = 461; price = 50000;}
case 6: {carid = 521; price = 55000;}
}
if(price > PlayerInfo[playerid][pMoney]) return SendClientMessage(playerid, COLOR_GREY, "Ti nemas dovolno novac.");
GiveDodMoney(playerid, -price);
format(string, sizeof(string), " Ti si kupio vozilo %s. (Za pomoc kucaj /carhelp)", RVN(carid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
//if(PlayerInfo[playerid][pVIP] >= 2 && PlayerInfo[playerid][vModel])
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, 1785.0105,-1760.2321,13.2738,0.3713,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(PlayerInfo[playerid][vVModel]) return SendClientMessage(playerid, COLOR_WHITE, "You already own two vehicles.");
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, 1774.8829,-1760.0675,13.2714,359.3683,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
}
}
else if(dialogid == 12) // Normal Vehicles
{
new string[128], carid, price;
if(response)
{
switch(listitem)
{
case 0: {carid = 480; price = 30000;}
case 1: {carid = 533; price = 26000;}
case 2: {carid = 439; price = 26000;}
case 3: {carid = 555; price = 28000;}
case 4: {carid = 405; price = 24000;} // Sentinel
case 5: {carid = 410; price = 22000;} // Manana
}
if(price > PlayerInfo[playerid][pMoney]) return SendClientMessage(playerid, COLOR_GREY, "Ti nemas dovolno novac.");
GiveDodMoney(playerid, -price);
format(string, sizeof(string), " Ti si kupio vozilo %s. (Za pomoc kucaj /carhelp)", RVN(carid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
//if(PlayerInfo[playerid][pVIP] >= 2 && PlayerInfo[playerid][vModel])
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, 1769.5779,-1760.2102,13.2701,1.2118,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(PlayerInfo[playerid][vVModel]) return SendClientMessage(playerid, COLOR_WHITE, "You already own two vehicles.");
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, 1759.7230,-1760.3000,13.2687,1.2075,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
}
}
else if(dialogid == 13) // Off-Road Vehicles
{
new string[128], carid, price;
if(response)
{
switch(listitem)
{
case 0: {carid = 579; price = 22000;}
case 1: {carid = 400; price = 24000;}
case 2: {carid = 495; price = 30000;}
}
if(price > PlayerInfo[playerid][pMoney]) return SendClientMessage(playerid, COLOR_GREY, "Ti nemas dovolno novac..");
GiveDodMoney(playerid, -price);
format(string, sizeof(string), " Ti si kupio vozilo %s. (Za pomoc kucaj /carhelp)", RVN(carid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
//if(PlayerInfo[playerid][pVIP] >= 2 && PlayerInfo[playerid][vModel])
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, 1754.8905,-1760.2903,13.2695,359.6279,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(PlayerInfo[playerid][vVModel]) return SendClientMessage(playerid, COLOR_WHITE, "You already own two vehicles.");
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, 1755.7909,-1745.9543,13.2752,271.7145,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
}
}
else if(dialogid == 14) // Sport Vehicles
{
new string[128], carid, price;
if(response)
{
switch(listitem)
{
case 0: {carid = 560; price = 60000;}
case 1: {carid = 429; price = 65000;}
case 2: {carid = 402; price = 70000;}
case 3: {carid = 541; price = 90000;}
case 4: {carid = 415; price = 80000;}
case 5: {carid = 559; price = 70000;}
case 6: {carid = 451; price = 110000;}
case 7: {carid = 506; price = 200000;}
case 8: {carid = 411; price = 300000;}
case 9: {carid = 562; price = 80000;}
}
if(price > PlayerInfo[playerid][pMoney]) return SendClientMessage(playerid, COLOR_GREY, "Ti nemas dovolno novac.");
GiveDodMoney(playerid, -price);
format(string, sizeof(string), " Ti si kupio vozilo %s. (Za pomoc kucaj /carhelp)", RVN(carid));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
//if(PlayerInfo[playerid][pVIP] >= 2 && PlayerInfo[playerid][vModel])
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, 1785.0105,-1760.2321,13.2738,0.3713,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(PlayerInfo[playerid][vVModel]) return SendClientMessage(playerid, COLOR_WHITE, "You already own two vehicles.");
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, 1769.5779,-1760.2102,13.2701,1.2118,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
}
}
else if(dialogid == 21) // Lowriders
{
new string[128], carid, price;
if(response)
{
switch(listitem)
{
case 0: {carid = 536; price = 25000;} // Blade
case 1: {carid = 575; price = 35000;} // Broadway
case 2: {carid = 534; price = 30000;} // Remington
case 3: {carid = 567; price = 25000;} // Savanna
case 4: {carid = 535; price = 27000;} // Slamvan
case 5: {carid = 576; price = 24000;} // Tornado
case 6: {carid = 412; price = 30000;} // Voodo
}
if(price > PlayerInfo[playerid][pMoney]) return SendClientMessage(playerid, COLOR_GREY, "Ti nemas dovolno novac.");
GiveDodMoney(playerid, -price);
format(string, sizeof(string), " Ti si kupio vozilo %s. (Za pomoc kucaj /carhelp)", RVN(carid));
SendClientMessage(playerid, COLOR_GREEN, string);
//if(PlayerInfo[playerid][pVIP] >= 2 && PlayerInfo[playerid][vModel])
if(PlayerInfo[playerid][vModel])
{
PlayerInfo[playerid][pVVeh] = CreateVehicle(carid, 1764.7581,-1760.1534,13.2689,0.8339,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vVLocked] = 1;
PlayerInfo[playerid][vVModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVX], PlayerInfo[playerid][vVY], PlayerInfo[playerid][vVZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVVeh], PlayerInfo[playerid][vVA]);
PlayerInfo[playerid][vVC1] = 0;
PlayerInfo[playerid][vVC2] = 0;
return 1;
}
if(PlayerInfo[playerid][vVModel]) return SendClientMessage(playerid, COLOR_WHITE, "You already own two vehicles.");
PlayerInfo[playerid][pVeh] = CreateVehicle(carid, 1755.8060,-1750.4338,13.2609,270.8691,0,0,1200);
SetVehicleParamsEx(PlayerInfo[playerid][pVeh], 0, 0, 0, 1, 0, 0, 0);
PlayerInfo[playerid][vLocked] = 1;
PlayerInfo[playerid][vModel] = carid;
GetVehiclePos(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vX], PlayerInfo[playerid][vY], PlayerInfo[playerid][vZ]);
GetVehicleZAngle(PlayerInfo[playerid][pVeh], PlayerInfo[playerid][vA]);
PlayerInfo[playerid][vC1] = 0;
PlayerInfo[playerid][vC2] = 0;
}
}