SA-MP Forums Archive
Car Ownership Problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Car Ownership Problem. (/showthread.php?tid=171570)



Car Ownership Problem. - sTeAlthy [Brandon Brown] - 27.08.2010

Alright, I'm not posting the code of the part of the vehicle dealership here. Reason is because I don't know which could be the problem.

Ok, so I have a Vehicle Ownership, and mods save when the server restarts, respawn the car, etc... and the only thing that I'm having problem with is it's not saving NOS. Don't know what could be the problem.

If you have a solution, add me either on MSN or xFire and I'll send you the code there.

xFire: brandon273
MSN: brandon_brown@eclipserp.org

Thanks,
Stealthy


Re: Car Ownership Problem. - Steven82 - 27.08.2010

Your going to have/need to show some coding to be able for some of us to fix the problem.


Re: Car Ownership Problem. - DiddyBop - 27.08.2010

post some script on where its saving components... stop hiding script no1 will steal simple shitz.


Re: Car Ownership Problem. - sTeAlthy [Brandon Brown] - 27.08.2010

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


Re: Car Ownership Problem. - sTeAlthy [Brandon Brown] - 04.09.2010

Hmm. No ideas?