Код:
if(dialogid == 1301)
{
if(response)
{
new car = GetPlayerVehicleID(playerid);
if(listitem == 0)
{
new component2 = GetVehicleComponentInSlot(car, 0);
new component = CarInfo[car][cComponent0];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent0] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Spoiler");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already an spoiler, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have an Spoiler to Save!");
return 1;
}
}
if(listitem == 1)
{
new component2 = GetVehicleComponentInSlot(car, 1);
new component = CarInfo[car][cComponent1];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent1] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Hood");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a hood, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a hood to Save!");
return 1;
}
}
if(listitem == 2)
{
new component2 = GetVehicleComponentInSlot(car, 2);
new component = CarInfo[car][cComponent2];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent2] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Roof");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a roof, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Roof to Save!");
return 1;
}
}
if(listitem == 3)
{
new component2 = GetVehicleComponentInSlot(car, 3);
new component = CarInfo[car][cComponent3];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent0] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Sideskirt");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already an Sideskirt, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Sideskirt to Save!");
return 1;
}
}
if(listitem == 4)
{
new component2 = GetVehicleComponentInSlot(car, 4);
new component = CarInfo[car][cComponent4];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent4] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Lamps");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already Lamps, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have Lamps to Save!");
return 1;
}
}
if(listitem == 5)
{
new component2 = GetVehicleComponentInSlot(car, 5);
new component = CarInfo[car][cComponent5];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent5] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Nitro");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a Nitro, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have Nitro to Save!");
return 1;
}
}
if(listitem == 6)
{
new component2 = GetVehicleComponentInSlot(car, 6);
new component = CarInfo[car][cComponent6];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent6] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Exhausts");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already an exhausts, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have Exhausts to Save!");
return 1;
}
}
if(listitem == 7)
{
new component2 = GetVehicleComponentInSlot(car, 7);
new component = CarInfo[car][cComponent7];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent7] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Wheels");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already Wheels, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have Wheels to Save!");
return 1;
}
}
if(listitem == 8)
{
new component2 = GetVehicleComponentInSlot(car, 8);
new component = CarInfo[car][cComponent8];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent8] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Stereo");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already an Stereo, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Stereo to Save!");
return 1;
}
}
if(listitem == 9)
{
new component2 = GetVehicleComponentInSlot(car, 9);
new component = CarInfo[car][cComponent9];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent9] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Hydraulics");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already Hydraulics, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have Hydraulics to Save!");
return 1;
}
}
if(listitem == 10)
{
new component2 = GetVehicleComponentInSlot(car, 10);
new component = CarInfo[car][cComponent10];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent10] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Front Bumper");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a Front Bumper, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Front Bumper to Save!");
return 1;
}
}
if(listitem == 11)
{
new component2 = GetVehicleComponentInSlot(car, 11);
new component = CarInfo[car][cComponent11];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent11] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Rear Bumper");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a Rear Bumper, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Rear Bumper to Save!");
return 1;
}
}
if(listitem == 12)
{
new component2 = GetVehicleComponentInSlot(car, 12);
new component = CarInfo[car][cComponent12];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent12] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Right Vent");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a Right Vent, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Right Vent to Save!");
return 1;
}
}
if(listitem == 13)
{
new component2 = GetVehicleComponentInSlot(car, 13);
new component = CarInfo[car][cComponent13];
if(component2 != 0)
{
if(component == 0)
{
CarInfo[car][cComponent13] = component2;
SendClientMessage(playerid, 0xFFFFFF96,"* You have Saved your Left vent");
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You have already a Left Vent, use the Clear option first!");
return 1;
}
}
else
{
SendClientMessage(playerid, 0xFFFFFF96,"* You don't have a Left Vent to Save!");
return 1;
}
}
}
}