SA-MP Forums Archive
How Can i change Car Tuning prices ? - 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: How Can i change Car Tuning prices ? (/showthread.php?tid=73069)



How Can i change Car Tuning prices ? - delow-music - 12.04.2009

Well, i want to change the price of what it costs to tune you'r car..

say i want to add a spoiler, and it normally costed $600.

how could i change the price of that?.

Thanks alot.


Re: How Can i change Car Tuning prices ? - 13th - 12.04.2009

You cannot change the "singleplayer" garage menus or prices.

Put you can do some workarounds. You could either script your own garage(s), or add some things under OnVehicleMod callback.
For example
Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
	GivePlayerMoney(playerid, -10000);
	SendClientMessage(playerid, COLOR_GREEN, "Every component costs 10 000$ extra");
	return 1;
}
Would make every component 10 000$ more expensive.

You could also do this for every component seperately.
Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
	switch( componentid )
	{
		case 1010: //nitro
			GivePlayerMoney(playerid, -1000);
		default: // everything else
			GivePlayerMoney(playerid, -10000);
	}
	return 1;
}
But still, the price in the "singleplayer tuning menu" would remain the same.