How to change car models and places in RPG mod ?
#1

Hi,
I have an RPG mod. or maybe GRP... I dont really know the diference.
I want to change a few car models, and to add a few more cars to the mod.
Well.. after a long day of trying there is no results
i found the script of the cars: it is called vehicles.txt and looks like this:
Код:
forward SyncVehicles();

enum vitem{
gas,
bool:locked,
bool:parduodama,
lastuser,
Float:lastpos[4],
owner_name[MAX_PLAYER_NAME]
}

new vehicleDB[MAX_VEHICLES][vitem];
new maxvehicles=6000; //Kiek yra masinu... paprasta :)

new aVehicleNames[212][] = {  // Vehicle Names - Betamaster
    {"Landstalker"},
    {"Bravura"},
    {"Buffalo"},
    {"Linerunner"},
    {"Perrenial"},
    {"Sentinel"},
   
    {"Tug"},
    {"Trailer 3"}, //petrotr
    {"Emperor"},
    {"Wayfarer"},
    {"Euros"},
    {"Hotdog"},
    {"Club"},
    {"Freight Carriage"}, //freibox
    {"Trailer 3"}, //artict3
    {"Andromada"},
    {"Dodo"},
    {"RC Cam"},
    {"Launch"},
    {"Police Car (LSPD)"},
    {"Police Car (SFPD)"},
    {"Police Car (LVPD)"},
    {"Police Ranger"},
    {"Picador"},
    {"S.W.A.T. Van"},
    {"Alpha"},
    {"Phoenix"},
    {"Glendale"},
    {"Sadler"},
    {"Luggage Trailer A"}, //bagboxa
    {"Luggage Trailer B"}, //bagboxb
    {"Stair Trailer"}, //tugstair
    {"Boxville"},
    {"Farm Plow"}, //farmtr1
    {"Utility Trailer"}, //utiltr1
    {"Stallion"}
};

new aBakai[212] = { 
    40,
    35,
  
    3,
    3,
    3,
    1,
    1, //hotrina
    1, //hotrinb
    3,
    3,
    3,
    2,
    3,
    0,
    0,
    15,
    12,
    8,
    18, //petro
    20,
    2,
    3,
    3,
    15,
  
    3,
    3,
    0, //bagboxa
    0, //bagboxb
    0, //tugstair
    3,
    0, //farmtr1
    0 //utiltr1
};

stock Vehicle(model,Float:x,Float:y,Float:z,Float:a,color,color2)
{
	AddStaticVehicleEx(model,x,y,z,a,color,color2,172800);
	maxvehicles++;

	vehicleDB[maxvehicles][gas]=random(aEda[model-400]);
	if(IsTurgus(x,y)) vehicleDB[maxvehicles][parduodama]=false; else vehicleDB[maxvehicles][parduodama]=true;

	return maxvehicles;
}

stock LoadVehicles(){
//Masinu info

Vehicle(519, -1204.439331, -140.778701, 15.062800, 135.903396, 8, 11);
Vehicle(519, -1243.274780, -95.277603, 15.067199, 135.154693, 61, 90);
Vehicle(519, -1366.982788, -481.259887, 15.092900, 204.989395, 21, 6);
Vehicle(519, -1443.214965, -520.578002, 15.094499, 208.136703, 24, 80);
Vehicle(453, -1447.086181, 97.708999, -0.271100, 315.734985, 19, 8);
Vehicle(453, -1647.230102, 253.820693, -0.384700, 89.580497, 4, 90);
Vehicle(453, -1724.284667, 231.096694, -0.405299, 269.016510, 17, 69);
Vehicle(453, -1475.650390, 692.980773, -0.336600, 1.947100, 11, 21);
Vehicle(453, -1720.307373, 1441.565551, -0.549300, 354.174987, 67, 112);
Vehicle(593, -1272.308349, -624.942382, 14.605099, 359.693908, 126, 17);

Vehicle(416,-2588.6829,658.0048,14.6022,270.7146,1,3); // greitoji1
Vehicle(416,-2588.6230,652.7795,14.6028,269.5663,1,3); // greitoji2
Vehicle(416,-2588.8757,647.4323,14.6022,270.1808,1,3); // greitoji3
Vehicle(416,-2588.9946,637.7626,14.6026,269.3292,1,3); // greitoji4
Vehicle(416,-2546.3220,653.2725,14.6083,89.7085,1,3); // greitoji5
Vehicle(416,-2545.8259,627.5700,14.6028,89.8860,1,3); // greitoji6

Vehicle(603,-2485.5837,2224.4426,4.6753,359.5248,90,111); // turgus
Vehicle(603,-2482.6729,2224.4292,4.6724,359.9005,90,111); // turgus
Vehicle(402,-2479.6792,2224.4941,4.6684,359.5132,90,111); // turgus
Vehicle(402,-2476.8853,2224.7227,4.6721,359.4394,90,111); // turgus
Vehicle(560,-2473.6731,2224.6550,4.5494,0.8885,90,111); // turgus
Vehicle(560,-2470.6597,2224.6021,4.5488,359.9163,90,111); // turgus
Vehicle(560,-2467.6230,2224.4788,4.5487,0.4167,90,111); // turgus
Vehicle(560,-2464.7905,2224.3660,4.5488,0.1263,90,111); // turguj
Vehicle(560,-2461.8232,2224.5212,4.5492,359.3122,90,111); // turgus
Vehicle(451,-2458.7625,2224.7881,4.5710,358.9272,90,111); // turgus
Vehicle(541,-2455.6028,2224.7957,4.5710,358.2527,90,111); // turgus
Vehicle(506,-2452.5981,2224.8120,4.5710,358.9702,90,111); // turgus
Vehicle(562,-2449.7761,2224.3569,4.5027,358.5582,90,111); // turgus
Vehicle(562,-2446.8000,2224.6003,4.5020,0.1032,90,111); // turgus
Vehicle(561,-2443.6563,2224.6267,4.6575,359.6397,90,111); // turgus
Vehicle(561,-2440.7847,2224.6133,4.6573,359.0941,90,111); // turgus
Vehicle(559,-2443.8567,2243.1182,4.4644,179.7043,90,111); // turgus
Vehicle(468,-2440.8887,2243.1865,4.3638,182.0008,90,111); // turgus
Vehicle(559,-2446.8870,2243.1621,4.4460,178.6469,90,111); // turgus
Vehicle(521,-2449.8892,2243.3342,4.2952,181.5516,90,111); // turgus
Vehicle(522,-2452.3870,2243.3350,4.2951,179.4761,90,111); // turgus
Vehicle(561,-2482.4363,2242.0540,4.6577,182.1182,90,111); // turgus
Vehicle(561,-2479.3057,2242.1970,4.6581,179.9721,90,111); // stratum
Vehicle(561,-2485.4617,2241.9561,4.6571,180.4526,90,111); // turgus

AddStaticVehicleEx(510,-2089.6584,-83.3067,34.8222,179.1557); // teisiu masina
AddStaticVehicleEx(560,-2081.2854,-83.1572,34.8222,179.1734); // teisiu masina
maxvehicles=AddStaticVehicleEx(599,-2072.5549,-83.0839,34.8221,179.6712); // teisiu masina

Vehicle(437,-2689.8113,-25.6145,4.4401,179.7169,47,74); // busas
Vehicle(437,-2686.5469,-25.7729,4.4344,178.5551,59,83); // busas
Vehicle(437,-2670.0508,-52.2534,4.4377,358.6544,75,59); // busas
Vehicle(437,-2650.0618,-52.4993,4.4322,0.7985,47,74); // busas
Vehicle(437,-2630.0979,-52.5024,4.4332,0.7157,59,83); // busas


new firstveh,lastveh;
firstveh = Vehicle(504,-1492.8896,951.3083,1036.6753,311.1741,57,38); // derbycar 1
Vehicle(504,-1495.6207,955.0388,1036.7422,309.7023,45,29); //
Vehicle(504,-1498.4537,958.3582,1036.8035,310.5524,34,9); //
Vehicle(504,-1500.9452,961.2712,1036.8607,307.1717,65,9); //
Vehicle(444,-1350.4283,934.2908,1036.7196,19.5167,32,42); //
Vehicle(444,-1343.6962,935.7961,1036.7319,20.2062,32,53); //
Vehicle(444,-1337.4296,936.8029,1036.7394,16.9933,32,66); //
Vehicle(444,-1331.6685,938.2119,1036.7559,16.2716,32,14); //
lastveh = Vehicle(444,-1325.8885,940.1790,1036.7789,21.6564,32,32); //

for(new id = firstveh; id <lastveh+1; id++)
{
	LinkVehicleToInterior(id,15);
	vehicleDB[id][parduodama]=true;
}

	new Float:tmpx,Float:tmpy,Float:tmpz;
	for(new i=0;i<maxvehicles+1;i++) 
	{
		vehicleDB[i][gas]=20;
		GetVehiclePos(i,tmpx,tmpy,tmpz);

		if(tmpy < 2252.83 && tmpy > 2213.796 && tmpx < -2422.32 && tmpx > -2496.709) 				vehicleDB[i][parduodama]=false; else vehicleDB[i][parduodama]=true;
	}

}

public SyncVehicles()
{
	new bool:DontSync[MAX_VEHICLES];
	for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
	{
		if(IsPlayerConnected(playerid))
		{
			if(IsPlayerInAnyVehicle(playerid))
			{
				DontSync[GetPlayerVehicleID(playerid)]=true;
			}
		}
	}
	
	for(new vehicleid=0;vehicleid<maxvehicles;vehicleid++)
	{
		if(!DontSync[vehicleid] && !vehicleDB[vehicleid][locked])
		{
			SetVehicleToRespawn(vehicleid);
		}
	}
	
}
It lookes like this script is the main car script. But i deleted this files, restarted the server and logged on again and the cars are in the game... like this script does not change anything....
Please help me ! where can i change the cars positions and models ?
Reply


Messages In This Thread
How to change car models and places in RPG mod ? - by mdaniel - 09.02.2009, 23:24
Re: How to change car models and places in RPG mod ? - by MenaceX^ - 09.02.2009, 23:48
Re: How to change car models and places in RPG mod ? - by BSMan - 10.02.2009, 04:39
Re: How to change car models and places in RPG mod ? - by mdaniel - 10.02.2009, 06:52
Re: How to change car models and places in RPG mod ? - by lovas123 - 03.01.2010, 08:42
Re: How to change car models and places in RPG mod ? - by Agent Smith - 03.01.2010, 08:48

Forum Jump:


Users browsing this thread: 1 Guest(s)