10.03.2009, 22:13
hey, Cr@zY! J?e here, well .. i saw a FS wich lets you add tuned cars, but why is it a FS? it has .. what? 200 lines? so.. i thaught id'e make a tutorial, also my friend asked me to show him how to add it to a GM, as he has 16 FS's soo.. this is realy easy, before u start saying " NOOB ITS EASY GTFO THESE FORUMS! " think of the "noobs" that don't know or just cannot do it
Top OF Script:
OnGameModeInit() Or OnFilterScriptInit() :
Under OnVehicleSpawn(vehicleid) :
as pandabeer pointed out, this is a timer to ensure that wen the vehicle respawns, the components are added, also, you need a timer, not just " TuneVehicle(); " otherwise, it would tune the vehicle BEFORE it actualy spawns.
Bottom of your script:
Wasn't hard now was it? no well.. heres some stuff you might want to know!
- MODELID - the model id of the vehicle you wish to make
X, Y, Z - the coordinates to wich the vehicle is spawned.
COLOR1, COLOR2, - the colors of the vehicle.
- This is needed as if we spawn the vehicle , the components are added before the vehicle is actualy spawned, "TuneVehicle" - FunctionName
tharefor, it adds the components AFTER the vehicle spawns.
1000 - 1 second in milliseconds.
0 - repeating = false.
No You do not, you add " AddVehicleComponent(VEHICLEID, COMPONENTID); under this line to the vehicle id defined at the top, "new VEHICLE;" is one, then maybe another 1, "new VEHICLE2;" ect.
Car Component ID's
Vehicle Model ID's
well i hope it helped you. have a nice time spawning modded cars, say goodbye to stock cars!
any bugs/typo's/problems/errors please post, DO NOT POST STUPID COMMENTS LIKE MIKEP's INSULTS, GTFO if u no how to do this, dont bover saying this like " easy, too easy .. anyone can do it. " TO MANY PPL CANT look through Scripting discussion.
thankyou, Donny for making me realise what MAY happen if newbies don't understand and wish to learn what these codes actualy DO. respect+
~Cr@zY! J?e~
Top OF Script:
pawn Код:
forward TuneVehicle();
new VEHICLE; // Adds your car, name it whatever you would like.
pawn Код:
VEHICLE = AddStaticVehicle(VEHICLEID, X, Y, Z, ANGLE, COLOR1, COLOR2); //vehicleid = The MODEL ID of the vehicle, you can get a list HERE
TuneVehicle(); // Tunes the vehicle.
pawn Код:
SetTimer("TuneVehicle",1000,0);
Bottom of your script:
pawn Код:
public TuneVehicle()
{
AddVehicleComponent(VEHICLE, COMPONENTID); // COMPONENTID = The ID of the component you wish to add to the vehicle.
return 1;
}
pawn Код:
forward TuneVehicle(); - Is needed for the public TuneVehicle() to work.
pawn Код:
new VEHICLE = AddStaticVehicle(VEHICLEID, X, Y, Z, ANGLE, COLOR1, COLOR2);
X, Y, Z - the coordinates to wich the vehicle is spawned.
COLOR1, COLOR2, - the colors of the vehicle.
pawn Код:
SetTimer("TuneVehicle",1000,0);
tharefor, it adds the components AFTER the vehicle spawns.
1000 - 1 second in milliseconds.
0 - repeating = false.
pawn Код:
public TuneVehicle()
{
AddVehicleComponent(VEHICLE, COMPONENTID); // COMPONENTID = The ID of the component you wish to add to the vehicle.
return 1;
}
Car Component ID's
Vehicle Model ID's
well i hope it helped you. have a nice time spawning modded cars, say goodbye to stock cars!
any bugs/typo's/problems/errors please post, DO NOT POST STUPID COMMENTS LIKE MIKEP's INSULTS, GTFO if u no how to do this, dont bover saying this like " easy, too easy .. anyone can do it. " TO MANY PPL CANT look through Scripting discussion.
thankyou, Donny for making me realise what MAY happen if newbies don't understand and wish to learn what these codes actualy DO. respect+
~Cr@zY! J?e~