SA-MP Forums Archive
car dosent show ingame - 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 dosent show ingame (/showthread.php?tid=145651)



car dosent show ingame - dragggon - 03.05.2010

I have gta RP gamemod
Ive put 2 cars in cars.cfg.
what I have to change in GM so the cars show ingame ??
cuz when I just put the cars in cars.cfg the cars wont show ingame


Re: car dosent show ingame - JC-Cooper - 03.05.2010

Quote:
Originally Posted by dragggon
I have gta RP gamemod
Ive put 2 cars in cars.cfg.
what I have to change in GM so the cars show ingame ??
cuz when I just put the cars in cars.cfg the cars wont show ingame
Same here, but i fix this prob...

LinkVehicleToInterior(CarID, InteriorID);

Ex: LinkVehicleToInterior(189, 0)

0 = Default

Maybe it helps


Re: car dosent show ingame - dragggon - 03.05.2010

I have put 2 Comets ingame , so I have to put like this

And Do I Put this Line in my GM or where ?
LinkVehicleToInterior(480, 7)

480 - Comet car ID .


Re: car dosent show ingame - JC-Cooper - 03.05.2010

Quote:
Originally Posted by dragggon
I have put 2 Comets ingame , so I have to put like this

And Do I Put this Line in my GM or where ?
LinkVehicleToInterior(480, 7)

480 - Comet car ID .
480 is ModelID, you have to use carid instead modelID

LinkVehicleToInterior(VehicleID,0)

VehicleID means what number car you using, like:


Код:
 AddStaticVehicle(426,579.7737,910.1716,-43.5148,321.5789,7,7); // Reservation 183
VehicleID/CarID is 183, ModelID is 426, got it?


Re: car dosent show ingame - dragggon - 03.05.2010

okay , I got it , but do I put this line in my gm ? next to others ?


Re: car dosent show ingame - JC-Cooper - 03.05.2010

After AddStaticVehicle(Ex), CreateVehicle...Under: public OnGameModeInit()


Re: car dosent show ingame - dragggon - 03.05.2010

can u do me example pls


Re: car dosent show ingame - JC-Cooper - 03.05.2010

If you using GTA Rp Script, so:


Код:
	AddStaticVehicle(426,614.8525,873.8575,-43.2182,28.9858,7,7); // Reservation 180
	AddStaticVehicle(426,612.1263,887.0045,-43.4468,5.1609,7,7); // Reservation 181
	AddStaticVehicle(426,588.0759,893.6481,-44.7892,128.3505,7,7); // Reservation 182
	AddStaticVehicle(426,579.7737,910.1716,-43.5148,321.5789,7,7); // Reservation 183
	//-------------------------------------------------------------------------------------------
	for(new h = 184; h < sizeof(CarInfo); h++)
	{
		AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
	}
	LinkVehicleToInterior(84, 7);
	LinkVehicleToInterior(85, 7);
	LinkVehicleToInterior(86, 7);
	LinkVehicleToInterior(87, 7);
	LinkVehicleToInterior(88, 4);
	LinkVehicleToInterior(89, 4);
	LinkVehicleToInterior(90, 4);
	LinkVehicleToInterior(91, 4);
	LinkVehicleToInterior(92, 14);
	LinkVehicleToInterior(93, 14);
	LinkVehicleToInterior(94, 14);
	LinkVehicleToInterior(95, 14);
	LinkVehicleToInterior(96, 14);
	for(new h = 0; h < sizeof(HouseInfo); h++)
This is part of script... and look these lines:


LinkToVehicleInterior.....


And you can also read about it: https://sampwiki.blast.hk/wiki/LinkVehicleToInterior


Re: car dosent show ingame - Peep - 03.05.2010

No no,

If you added cars to cars.cfg then you need make the car ammount bigger in gamemode. Ownable cars ammounts.


Re: car dosent show ingame - JC-Cooper - 03.05.2010

Yea, you can put #700 too, but thats not a good idea...

Check these lines:

Код:
public IsAnOwnableCar(vehicleid)
{
	if(vehicleid >= 184 && vehicleid <= 268) { return 1; }
	return 0;
}
&

Код:
	for(new h = 184; h < sizeof(CarInfo); h++)
	{
		AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
	}
Just increase these numbers a little....ex: 250 or 300, depends how many cars you want to make buyable...


I know, my english is not very good, but i hope you understand