Create vehicles ingame
#2

pawn Code:
TaxiCar =   AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar will hold the id of the created vehicle

so if this is the first vehicle to be created TaxiCar will = 1


so doing something like
pawn Code:
TaxiCar =   AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar =   AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar =   AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar =   AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
will alter the value each time
pawn Code:
TaxiCar =   AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar2 =  AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar3 =  AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar4 =  AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
this is more how it will be done.

or even use an array

pawn Code:
new TaxiCar[4];
TaxiCar[0] =    AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar[1] =    AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar[2] =    AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
TaxiCar[3] =    AddStaticVehicleEx(420,2044.8854,1473.2106,10.4494 ,181.3339,6,1,-1);
Reply


Messages In This Thread
Create vehicles ingame - by jop9888 - 13.05.2012, 17:41
Re: Create vehicles ingame - by Jonny5 - 13.05.2012, 17:46
Re: Create vehicles ingame - by jop9888 - 13.05.2012, 17:59
Re: Create vehicles ingame - by Jonny5 - 13.05.2012, 18:20
Re: Create vehicles ingame - by jop9888 - 13.05.2012, 18:45
Re: Create vehicles ingame - by Jonny5 - 13.05.2012, 18:52
Re: Create vehicles ingame - by Yuryfury - 13.05.2012, 19:40
Re: Create vehicles ingame - by jop9888 - 20.05.2012, 23:14

Forum Jump:


Users browsing this thread: 3 Guest(s)