Adding cars for factions
#5

Quote:
Originally Posted by ledzep
After a quick look through the script, it looks very much like your run of the mill GF edit, so adding faction cars will not be very simple for a beginner.

Since I guess you do not want to count hundreds of lines of messy code, we will create a variable to store the new vehicle's vehicleid.

What you have to do is store the vehicleid of the new faction car you want to add in some variable like so:

Код:
OnGameModeInit(){
    ...
	AddStaticVehicleEx(463,694.8008,-470.2188,15.8761,88.6982,114,114,30000); // Freeway 7
	AddStaticVehicleEx(463,694.9393,-473.1948,15.8766,94.6246,114,114,30000); // Freeway 8
	AddStaticVehicleEx(463,708.5647,-467.8399,15.8754,271.5996,114,114,30000); // Freeway 9
	AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // Freeway 10

    factionCar1 = AddStaticVehicleEx(463,708.6929,-470.7145,15.8735,268.4506,114,114,30000); // New LA Vice car we are adding, yay!
}
and then edit the function that corresponds to which faciton you are adding the car to so they can use it exclusively (we are giving this car to faction 5 [aka LA Vice]).

Код:
public IsAGangCar5(carid)
{
	if((carid >= 17 && carid <= 18) || (carid == 44) || (carid == 134) || (carid == 1359) || (carid == factionCar1) ) // we edited this line
	{
		return 1;
	}
	return 0;
}
Hope that helps.
why faction AddStaticVehicleEx ? i always use AddStaticVehicle !
i think your faction will auto tune car!
Reply


Messages In This Thread
Adding cars for factions - by ls200 - 20.06.2010, 18:52
Re: Adding cars for factions - by ls200 - 20.06.2010, 20:24
Re: Adding cars for factions - by ls200 - 21.06.2010, 05:48
Re: Adding cars for factions - by ledzep - 21.06.2010, 06:08
Re: Adding cars for factions - by oOhossamOo - 21.06.2010, 06:11
Re: Adding cars for factions - by ledzep - 21.06.2010, 06:15
Re: Adding cars for factions - by ls200 - 21.06.2010, 07:18
Re: Adding cars for factions - by DJDhan - 21.06.2010, 07:23
Re: Adding cars for factions - by ls200 - 21.06.2010, 07:32
Re: Adding cars for factions - by ledzep - 21.06.2010, 07:39

Forum Jump:


Users browsing this thread: 2 Guest(s)