Lol, Not trying to hide it but this is the only thing I got.
I think this might be the problem, it's not saving in a slot?
Код:
public OnVehicleMod(playerid,vehicleid,componentid)
{
if(!IsAnOwnableCar(vehicleid))
{
SendClientMessage(playerid,COLOR_GREY,"Vehicle is not ownable, Cannot save mod.");
}
new car = VehicleOwned[vehicleid];
if(CarInfo[car][cMod][0] == 0)
{
CarInfo[car][cMod][0] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 0.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][1] == 0)
{
CarInfo[car][cMod][1] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 1.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][2] == 0)
{
CarInfo[car][cMod][2] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 2.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][3] == 0)
{
CarInfo[car][cMod][3] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 3.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][4] == 0)
{
CarInfo[car][cMod][4] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 4.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][5] == 0)
{
CarInfo[car][cMod][5] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 5.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][6] == 0)
{
CarInfo[car][cMod][6] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 6.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][7] == 0)
{
CarInfo[car][cMod][7] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 7.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][8] == 0)
{
CarInfo[car][cMod][8] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 8.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else if(CarInfo[car][cMod][9] == 0)
{
CarInfo[car][cMod][9] = componentid;
SendClientMessage(playerid,COLOR_WHITE,"Vehicle component bought for 100$, Slot 9.");
GivePlayerPCash(playerid,-100);
SaveCars();
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"No more free slots.");
}
return 1;
}
Edit: It's also not saving the Paintjobs for like Jesters, Sultans etc.. that can be modded on Wheels Arch Angel