Jump to content
  • 0

pomoc [SL 5.77] Načítanie Tuningu


Guyy

Dotaz

Ahoj :)

V Includoch som našiel Street Life 5.77, tak som sa rozhodol si to dať na Server, a znovu si to zahrať, možno aj upraviť / sprovozniť. Lenže som narazil na problém.. Ked ku domu kúpim Auto, následne ho vytuním a Respawnem, nenačíta ten Tuning.. Tu je kód s OnVehicleSpawn a s Ukladania Tuningu, prosím, napíšte mi ako zrobiť to načítavanie.. Ďakujem

 

 

 

OnVehicleSpawn: (Load áut, ale tuningu nie)

	for(new h=0; h<MAX_HOUSES; h++)
	{
	    for(new s=0; s<HouseStates[h][Vehicles]; s++)
		{
		    if(Car_State[s][h] == true)
		    {
		        if(vehicleid == Car[s][h])
				{
			        SetVehiclePos(vehicleid, HV_x2[s][h],HV_y2[s][h],HV_z2[s][h]);
			        SetTimerEx("SetVehicleZAngleEx", 300, 0, "ii", vehicleid, floatround(HV_a2[s][h]));
			        return 0;
		        }
	        }
	    }
	}

OnVehicleMod: (Ukládanie Tuningu)

	if(Player[playerid][HouseP] != 9999)
	{
		for(new h=0; h<MAX_HOUSES; h++)
		{
		    for(new s=0; s<HouseStates[h][Vehicles]; s++)
			{
			    if(Car_State[s][h] == true)
			    {
			        if(vehicleid == Car[s][h])
					{
					    format(way, 64, "SL/Server/Houses/House%d.cfg", h);

                        if(componenttype == CARMODTYPE_WHEELS) format(itemname, 16, "V%d_wheels", s);
						if(componenttype == CARMODTYPE_SPOILER) format(itemname, 16, "V%d_spoiler", s);
						if(componenttype == CARMODTYPE_FRONT_BUMPER) format(itemname, 16, "V%d_pn", s);
						if(componenttype == CARMODTYPE_SIDESKIRT) //42
						{
						    item2 = true;

						    format(itemname, 16, "V%d_snR", s);
						    format(itemname2, 16, "V%d_snL", s);

						    if(componentid == 1007) componentid2=1017;
						    if(componentid == 1017) componentid2=1007;
						    if(componentid == 1026) componentid2=1027;
						    if(componentid == 1027) componentid2=1026;
						    if(componentid == 1030) componentid2=1031;
						    if(componentid == 1031) componentid2=1030;
						    if(componentid == 1036) componentid2=1040;
						    if(componentid == 1040) componentid2=1036;
						    if(componentid == 1039) componentid2=1041;
						    if(componentid == 1041) componentid2=1039;
						    if(componentid == 1042) componentid2=1099;
						    if(componentid == 1099) componentid2=1042;
						    if(componentid == 1047) componentid2=1051;
						    if(componentid == 1051) componentid2=1047;
						    if(componentid == 1048) componentid2=1052;
						    if(componentid == 1052) componentid2=1048;
						    if(componentid == 1056) componentid2=1062;
						    if(componentid == 1062) componentid2=1056;
						    if(componentid == 1057) componentid2=1063;
						    if(componentid == 1063) componentid2=1057;
						    if(componentid == 1069) componentid2=1071;
						    if(componentid == 1071) componentid2=1069;
						    if(componentid == 1070) componentid2=1072;
						    if(componentid == 1072) componentid2=1070;
						    if(componentid == 1090) componentid2=1094;
						    if(componentid == 1094) componentid2=1090;
						    if(componentid == 1093) componentid2=1095;
						    if(componentid == 1095) componentid2=1093;
						    if(componentid == 1101) componentid2=1122;
						    if(componentid == 1122) componentid2=1101;
						    if(componentid == 1102) componentid2=1133;
						    if(componentid == 1133) componentid2=1102;
						    if(componentid == 1106) componentid2=1124;
						    if(componentid == 1124) componentid2=1106;
						    if(componentid == 1107) componentid2=1108;
						    if(componentid == 1108) componentid2=1107;
						    if(componentid == 1118) componentid2=1120;
						    if(componentid == 1120) componentid2=1118;
						    if(componentid == 1119) componentid2=1121;
						    if(componentid == 1121) componentid2=1119;
						    if(componentid == 1134) componentid2=1137;
						    if(componentid == 1137) componentid2=1134;
						}
						if(componenttype == CARMODTYPE_REAR_BUMPER) format(itemname, 16, "V%d_zn", s);
						if(componenttype == CARMODTYPE_EXHAUST) format(itemname, 16, "V%d_exhaust", s);
						if(componenttype == CARMODTYPE_NITRO) format(itemname, 16, "V%d_nitro", s);
						if(componenttype == CARMODTYPE_HYDRAULICS) format(itemname, 16, "V%d_hyd", s);
						if(componenttype == CARMODTYPE_ROOF) format(itemname, 16, "V%d_roof", s);

						dini_IntSet(way, itemname, componentid);
						if(item2 == true) dini_IntSet(way, itemname2, componentid2);

				        break;
			        }
		        }
		    }
		}
	}

 

 

Edited by Carlosoo
Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0

Ved práve oto ide.. Žiaden nieje.. :d To čo som tam dal, OnVehicleSpawn tak tam je Loadovanie áut s Housu, lenže Load Tuningu tam nieje.. Preto som tam dal aj OnVehicleMod že či by niekto nevedel ako s toho urobiť Load.. :d Pretože ja neviem ako, ale napadla ma jedna vec, vyskúšam a potom napíšem :)


Nejde :(

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...