Рекомендованные сообщения



Не найдено.

27 posts in this topic

У меня есть вот такая строка с командой sellcar, при её продаже владелец в базе данных становится The State, как мне сделать так же но с другой таблицей в базе?zv1wv4wn2lI.jpg

Share this post


Link to post
Share on other sites

@Nargo

 

Во-первых, прекратите насиловать наши глаза и перестаньте заливать код скриншотами. Для этого существует инструментарий форума. Подробней: https://pawno-rus.ru/osnova.html/faq/spoiler-and-code/

Во-вторых, опишите конкретно в какой таблице нужно сделать и там уже подгоним. 

Share this post


Link to post
Share on other sites

 

51 минуту назад, DEST сказал:

@Nargo

 

Во-первых, прекратите насиловать наши глаза и перестаньте заливать код скриншотами. Для этого существует инструментарий форума. Подробней: https://pawno-rus.ru/osnova.html/faq/spoiler-and-code/

Во-вторых, опишите конкретно в какой таблице нужно сделать и там уже подгоним. 

В таблице Ownable чтобы столбец Engine при продаже машины ставился н

Share this post


Link to post
Share on other sites

@Nargo такой столбец в самой  базе присутствует и на что требуется  изменить его значение? 

Share this post


Link to post
Share on other sites
43 минуты назад, DEST сказал:

@Nargo такой столбец в самой  базе присутствует и на что требуется  изменить его значение? 

Да присутствует всё, чтобы значение было 0

Share this post


Link to post
Share on other sites

@Nargo ну тогда в той строке, которая отмечена красным цветом на вашем скрине, поменяйте значение с 1 на 0

Share this post


Link to post
Share on other sites
1 час назад, DEST сказал:

@Nargo ну тогда в той строке, которая отмечена красным цветом на вашем скрине, поменяйте значение с 1 на 0

Лол если бы было так просто, эту строку я добавил сам скопировав верхнюю и изменив значение как только не пробовал при продаже машины оно не меняет значение, почему не работает не знаю

Share this post


Link to post
Share on other sites

@Nargo скидывайте сток / паблик сохранения данных о машине из мода

Share this post


Link to post
Share on other sites
47 минут назад, DEST сказал:

@Nargo скидывайте сток / паблик сохранения данных о машине из мода

Как его найти можно?

Share this post


Link to post
Share on other sites

@Nargo по ключевым названиям, типо: 

SaveCar 

SaveVeh

Save

и пр. 

Если машина сохраняется в таблице с аккаунтами, то искать для аккаунтов

SaveAcc

SaveAccount 

и пр. 

Share this post


Link to post
Share on other sites
2 часа назад, DEST сказал:

@Nargo по ключевым названиям, типо: 

SaveCar 

SaveVeh

Save

и пр. 

Если машина сохраняется в таблице с аккаунтами, то искать для аккаунтов

SaveAcc

SaveAccount 

и пр. 

Спойлер

new onlineinfo[MAX_PLAYERS][lInfo];
enum cInfo
{
	cID,
	cModel,
Float:cSell_X,
Float:cSell_Y,
Float:cSell_Z,
Float:cSell_A,
Float:cPos_X,
Float:cPos_Y,
Float:cPos_Z,
Float:cPos_A,
	cColor_1,
	cColor_2,
	cOwner[24],
	cShtrafer,
	cNumber[30],
	cKeyer[24],
	cLock,
	cCost,
	cNeon,
	cShtraf,
	cAlarmON,
	cKeyIN,
Float:cMilage,
Float:cHealth,
	cOnNumber[10],
	cRegister[24],
	cOnRegister[24],
	cNumberColor,
	cVirt
//	cInt
Спойлер


	//Загрузка автомобилей
	for(new i = 0;i < OWNABLECARS;i ++)
	{
		OwnableCar[i] = J_AddStaticVehicleEx(CarInfo[i][cModel],CarInfo[i][cPos_X],CarInfo[i][cPos_Y],CarInfo[i][cPos_Z],CarInfo[i][cPos_A],CarInfo[i][cColor_1],CarInfo[i][cColor_2],60000);
		CarText[i] = CreateDynamic3DTextLabel("-",-1,0,0,0.5,5.0,INVALID_PLAYER_ID,OwnableCar[i]);
		ReSetCarPrice(i);
		new number = OwnableCar[i];
		new virt = CarInfo[i][cVirt];
		if(!GetString(CarInfo[i][cOwner],"The State")) SetVehicleVirtualWorld(number, virt);

	}
	
Спойлер



GetVehicleID(carid)
{
	return carid - OwnableCar[0];
}
IsAOwnableCar(carid)
{
	return (OwnableCar[0] <= carid <= OwnableCar[OWNABLECARS-1]);
}
IsASellCar(carid)
{
	if(IsAOwnableCar(carid))
	{
		new number = GetVehicleID(carid);
		if(GetString(CarInfo[number][cOwner],"The State")) return true;
	}
	return false;
}
GetString(param1[],param2[])
{
	return !strcmp(param1, param2, false);
}
Спойлер




SellCar(carid)
{
	new number = GetVehicleID(carid);
	CarInfo[number][cPos_X] = CarInfo[number][cSell_X];
	CarInfo[number][cPos_Y] = CarInfo[number][cSell_Y];
	CarInfo[number][cPos_Z] = CarInfo[number][cSell_Z];
	CarInfo[number][cPos_A] = CarInfo[number][cSell_A];
	CarInfo[number][cColor_1] = 1;
	CarInfo[number][cColor_2] = 1;
	SetString(CarInfo[number][cOwner], "The State");
	SetString(CarInfo[number][cKeyer], "The State");
	CarInfo[number][cShtrafer] = 0;
	SetString(CarInfo[number][cNumber],"SA");
	ReSetCarPrice(number);
	CarInfo[number][cLock] = 0;
	CarInfo[number][cShtraf] = 0;
	CarInfo[number][cKeyIN] = 0;
	CarInfo[number][cAlarmON] = 0;
	CarInfo[number][cMilage] = 0;
	//CarInfo[number][cInt] = 0;

	CarInfo[number][cNumberColor] = 0;
	SetString(CarInfo[number][cOnNumber],"The State");
	SetString(CarInfo[number][cOnRegister],"The State");
	SetString(CarInfo[number][cRegister],"The State");
	DestroyVehicleEx(carid);
	J_AddStaticVehicleEx(CarInfo[number][cModel],CarInfo[number][cPos_X],CarInfo[number][cPos_Y],CarInfo[number][cPos_Z],CarInfo[number][cPos_A],CarInfo[number][cColor_1],CarInfo[number][cColor_1],100000);
	//SetVehicleNumberPlate(carid,"SA");
	VehicleInfo[carid][vAntiRepair]=2;
	VehicleHealth[carid] = 1000;
	DelTunCar(carid);
	SetVehicleVirtualWorld(number, 0);
	LinkVehicleToInterior(number, 0);
	SetVehicleToRespawn(carid);
	SaveOwnableCar(number);
	return true;
}
Спойлер





format(str, sizeof(str), "UPDATE `usrboston` SET `Money`=`Money`+'%d' WHERE `NickName` = '%s'; ",CarInfo[vehid][cCost], CarInfo[vehid][cOwner]);
					mysql_tquery(mysql, str);
				}
				//aml(51, -1, CarInfo[vehid][cOwner], "îòîáðàëè ìàøèíó çà íåóïëàòó íàëîãîâ", CarInfo[vehid][cCost]);
				SetString(CarInfo[vehid][cOwner], "The State");
				SetString(CarInfo[vehid][cKeyer], "The State");
				CarInfo[vehid][cShtrafer] = 0;

				CarInfo[vehid][cNumberColor] = 0;
				SetString(CarInfo[vehid][cNumber],"SA");
				SetString(CarInfo[vehid][cOnNumber],"The State");
				SetString(CarInfo[vehid][cOnRegister],"The State");
				SetString(CarInfo[vehid][cRegister],"The State");
				ReSetCarPrice(vehid);
				CarInfo[vehid][cLock] = 0;
				CarInfo[vehid][cShtraf] = 0;
				CarInfo[vehid][cKeyIN] = 0;
				CarInfo[vehid][cAlarmON] = 0;
				CarInfo[vehid][cMilage] = 0;
				CarInfo[vehid][cVirt] = 0;
			//	CarInfo[vehid][cInt] = 0;
				DestroyVehicleEx(OwnableCar[vehid]);
				J_AddStaticVehicleEx(CarInfo[vehid][cModel],CarInfo[vehid][cPos_X],CarInfo[vehid][cPos_Y],CarInfo[vehid][cPos_Z],CarInfo[vehid][cPos_A],CarInfo[vehid][cColor_1],CarInfo[vehid][cColor_1],100000);
				//SetVehicleNumberPlate(vehid,"SA");
				VehicleInfo[OwnableCar[vehid]][vAntiRepair]=2;
				VehicleHealth[OwnableCar[vehid]] = 1000;
				DelTunCar(OwnableCar[vehid]);
				SetVehicleToRespawn(OwnableCar[vehid]);
				SetVehicleVirtualWorld(OwnableCar[vehid],CarInfo[vehid][cVirt]);
			//	LinkVehicleToInterior(OwnableCar[vehid],CarInfo[vehid][cVirt]);
				SaveOwnableCar(vehid);
				format(string,sizeof(string),"< Øòðàô Ñòîÿíêà > Ìàøèíà %d áûëà ïðîäàíà â ãîñ.",vehid);
				SendAdminsMessage(COLOR_RED,string,1);
			}
		}
		SaveOwnableCar(vehid);
Спойлер






stock LoadOwnableCars()
{
	new Cache:result = mysql_query(mysql, "SELECT * FROM `ownable`");
	OWNABLECARS = cache_get_row_count(mysql);
	for(new idx = 0;idx < OWNABLECARS; idx++)
	{
		CarInfo[idx][cID] = cache_get_row_int(idx, 0, mysql);
		CarInfo[idx][cModel] = cache_get_row_int(idx, 1, mysql);
		CarInfo[idx][cSell_X] = cache_get_row_float(idx, 2, mysql);
		CarInfo[idx][cSell_Y] = cache_get_row_float(idx, 3, mysql);
		CarInfo[idx][cSell_Z] = cache_get_row_float(idx, 4, mysql);
		CarInfo[idx][cSell_A] = cache_get_row_float(idx, 5, mysql);
		CarInfo[idx][cPos_X] = cache_get_row_float(idx, 6, mysql);
		CarInfo[idx][cPos_Y] = cache_get_row_float(idx, 7, mysql);
		CarInfo[idx][cPos_Z] = cache_get_row_float(idx, 8, mysql);
		CarInfo[idx][cPos_A] = cache_get_row_float(idx, 9, mysql);
		CarInfo[idx][cColor_1] = cache_get_row_int(idx, 10, mysql);
		CarInfo[idx][cColor_2] = cache_get_row_int(idx, 11, mysql);
		cache_get_row(idx, 12, CarInfo[idx][cOwner], mysql, 24);
		cache_get_row(idx, 13, CarInfo[idx][cKeyer], mysql, 24);
		CarInfo[idx][cShtrafer] = cache_get_row_int(idx, 14, mysql);
		cache_get_row(idx, 15, CarInfo[idx][cNumber], mysql, 30);
		CarInfo[idx][cCost] = cache_get_row_int(idx, 16, mysql);
		CarInfo[idx][cLock] = cache_get_row_int(idx, 17, mysql);
		CarInfo[idx][cShtraf] = cache_get_row_int(idx, 18, mysql);
		CarInfo[idx][cKeyIN] = cache_get_row_int(idx, 19, mysql);
		CarInfo[idx][cAlarmON] = cache_get_row_int(idx, 20, mysql);
		CarInfo[idx][cMilage] = cache_get_row_float(idx, 21, mysql);
		cache_get_row(idx, 22, CarInfo[idx][cOnNumber], mysql, 10);
		cache_get_row(idx, 23, CarInfo[idx][cRegister], mysql, 24);
		cache_get_row(idx, 24, CarInfo[idx][cOnRegister], mysql, 24);
		CarInfo[idx][cNumberColor] = cache_get_row_int(idx, 25, mysql);
	}
	cache_delete(result, mysql);
	return true;
}
Спойлер







SaveOwnableCar(carid)
{
	new string[700], string1[500];
	format(string, sizeof(string), "UPDATE `ownable` SET \
	`Model` = '%d', `Sell_X` = '%.4f', `Sell_Y` = '%.4f', `Sell_Z` = '%.4f', `Sell_A` = '%.4f', \
	`Pos_X` = '%.4f', `Pos_Y` = '%.4f', `Pos_Z` = '%.4f', `Pos_A` = '%.4f', `Color_1` = '%d', \
	`Color_2` = '%d', `Owner` = '%s', `Keyer` = '%s', `Shtrafer` = '%d', `Number` = '%s', \
	`Cost` = '%d', `Lock` = '%d', `Shtraf` = '%d', `KeyIN` = '%d', \
	`AlarmON` = '%d', `Milage` = '%f', `Virt` = '%d' WHERE `ID` = '%i'",
	CarInfo[carid][cModel],
	CarInfo[carid][cSell_X],
	CarInfo[carid][cSell_Y],
	CarInfo[carid][cSell_Z],
	CarInfo[carid][cSell_A],
	CarInfo[carid][cPos_X],
	CarInfo[carid][cPos_Y],
	CarInfo[carid][cPos_Z],
	CarInfo[carid][cPos_A],
	CarInfo[carid][cColor_1],
	CarInfo[carid][cColor_2],
	CarInfo[carid][cOwner],
	CarInfo[carid][cKeyer],
	CarInfo[carid][cShtrafer],
	CarInfo[carid][cNumber],
	CarInfo[carid][cCost],
	CarInfo[carid][cLock],
	CarInfo[carid][cShtraf],
	CarInfo[carid][cKeyIN],
	CarInfo[carid][cAlarmON],
	CarInfo[carid][cMilage],
	CarInfo[carid][cVirt],
	carid+1);

	format(string1, sizeof(string1), "UPDATE `ownable` SET \
	`Guns` = '%d', `Drugs` = '%d', `Armours` = '%d',\
	`Packets` = '%d', `Moneys` = '%d', `Kanistras` = '%d', `Healts` = '%d', `OnNumber`='%s', `Register`='%s', `OnRegister`='%s', `NumberColor`='%d', `Virt`='%d' WHERE `ID` = '%i'",
	TrunkInfo[carid][tMats],
	TrunkInfo[carid][tDrugs],
	TrunkInfo[carid][tArmours],
	TrunkInfo[carid][tPackets],
	TrunkInfo[carid][tMoney],
	TrunkInfo[carid][tKanistra],
	TrunkInfo[carid][tDee],
	CarInfo[carid][cOnNumber],
	CarInfo[carid][cRegister],
	CarInfo[carid][cOnRegister],
	CarInfo[carid][cNumberColor],
	CarInfo[carid][cVirt],
	carid);
	mysql_query(mysql, string, false);
	mysql_query(mysql, string1, false);
	return true;
}

Там много всего по этому поводу, может то скинул

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

@Nargo так в сохранении нет сохранения состояния двигателя. 

Share this post


Link to post
Share on other sites
1 час назад, DEST сказал:

@Nargo так в сохранении нет сохранения состояния двигателя. 

Да его нету, но при покупке TwinTurbo эти значения вносятся в базу а мне нужно чтобы они удалялись при продаже машины

Share this post


Link to post
Share on other sites

@Nargo так а чего тогда вы меня путаете? 

18 часов назад, Nargo сказал:

чтобы столбец Engine при продаже машины

 

16 часов назад, DEST сказал:

такой столбец в самой  базе присутствует

 

15 часов назад, Nargo сказал:

Да присутствует всё

 

Сами все затягиваете. 

8 часов назад, Nargo сказал:

Да его нету, но при покупке TwinTurbo эти значения вносятся в базу а мне нужно чтобы они удалялись при продаже машины

Еще раз. Напишите точно. Какие значения нужно обнулять / изменять после продажи? (указать названия столбцов в базе данных)

Share this post


Link to post
Share on other sites
11 минут назад, DEST сказал:

@Nargo так а чего тогда вы меня путаете? 

 

 

 

Сами все затягиваете. 

Еще раз. Напишите точно. Какие значения нужно обнулять / изменять после продажи? (указать названия столбцов в базе данных)

При продаже сделать значения

Engine = 0

Break = 0

Wheel = 0

Discs = 0

Shock_absorbers = 0

Share this post


Link to post
Share on other sites

@Nargo Я так понял, что сохранение тюнинга и сохранение машины идет по-разному. Кинь паблик OnVehicleSpawn

Share this post


Link to post
Share on other sites
1 минуту назад, DEST сказал:

@Nargo Я так понял, что сохранение тюнинга и сохранение машины идет по-разному. Кинь паблик OnVehicleSpawn

Спойлер

public OnVehicleSpawn(vehicleid)
{
    if(GetVehicleModel(vehicleid) == 420)DestroyDynamicObject(Taxt__text[vehicleid]);
	if(GetVehicleModel(vehicleid) == 420)
	{
		Taxt__text[vehicleid] = CreateDynamicObject(19327,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
		SetDynamicObjectMaterialText(Taxt__text[vehicleid], 0, "{FFFFFF}- Andreno TAXI -", 90, "Calibri", 20, 0, 0, 0, 0);
		AttachDynamicObjectToVehicle(Taxt__text[vehicleid], vehicleid, 0.740, -1.945, 0.348, -57.200, 0.000, 0.000);

		Taxt__text[vehicleid] = CreateDynamicObject(19327,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
		SetDynamicObjectMaterialText(Taxt__text[vehicleid], 0, "{FFFFFF}- Andreno TAXI -", 90, "Calibri", 20, 0, 0, 0, 0);
		AttachDynamicObjectToVehicle(Taxt__text[vehicleid], vehicleid, 0.750, -2.332, 0.042, -50.799, 0.000, 0.000);

		Taxt__text[vehicleid] = CreateDynamicObject(19327,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
		SetDynamicObjectMaterialText(Taxt__text[vehicleid], 0, "{FFFFFF}Tel: -913-", 90, "Calibri", 27, 0, 0, 0, 1);
		AttachDynamicObjectToVehicle(Taxt__text[vehicleid], vehicleid, 0.000, -1.713, 0.507, -58.899, 0.000, 0.000);

		Taxt__text[vehicleid] = CreateDynamicObject(19327,0.0,0.0,-1000.0,0.0,0.0,0.0,-1,-1,-1,300.0,300.0);
		SetDynamicObjectMaterialText(Taxt__text[vehicleid], 0, "{FFFFFF} - T -", 50, "Calibri", 20, 0, 0, 0, 0);
		AttachDynamicObjectToVehicle(Taxt__text[vehicleid], vehicleid, -0.850, 2.190, 0.220, -86.099, 0.000, 180.000);
	}
	if(vehicleid == Train[0])
	{
		J_SetVehiclePos(vehicleid,1449.4336,2634.5730,10.8203);
		SetVehicleZAngle(vehicleid,268.8779);
	}
	if(vehicleid == Train[1])
	{
		J_SetVehiclePos(vehicleid,1722.4261,-1953.7583,13.5391);
		SetVehicleZAngle(vehicleid,269.2892);
	}
	if(vehicleid == Train[2])
	{
		J_SetVehiclePos(vehicleid,1722.4261,-1953.7583,13.5391);
		SetVehicleZAngle(vehicleid,269.2892);
	}
	if(vehicleid == Train[3])
	{
		J_SetVehiclePos(vehicleid,-2003.8816,505.2282,34.6884);
		SetVehicleZAngle(vehicleid,179.1476);
	}
	if((GetVehicleModel(vehicleid)==426 && VehicleInfo[vehicleid][vTeam]==TEAM_LICENSERS) || GetVehicleModel(vehicleid)==538)DestroyDynamicObject(avtock[vehicleid]);
	if(GetVehicleModel(vehicleid)==426 && VehicleInfo[vehicleid][vTeam]==TEAM_LICENSERS)
	{
		avtock[vehicleid] = CreateDynamicObject(19309,0.0, 0.0, 0, 0.0, 0.0, 0.0, -1,  -1, -1,100.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "Учебная",50, "Tahoma", 27, 1, -1, -65536, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 0.0, -0.5, 0.9, 0.0, 0.0, 0.0);
	}

	if(GetVehicleModel(vehicleid) == 538)
	{
		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "t", 130, "Webdings", 130, 0, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.501,-6.544,0.010,0.000,0.000,90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "t", 130, "Webdings", 130, 0, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.516,-6.716,0.010,0.000,0.000,-90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, ""NAMEICRP"", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.508,-2.711,-0.084,0.000,0.000,-90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "Railway", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.508,-5.052,-0.084,0.000,0.000,-90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, ""NAMEICRP"", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.494,-5.052,-0.084,0.000,0.000,90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "Railway", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.494,-2.711,-0.084,0.000,0.000,90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, ""NAMEICRP"", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid,  -1.51600, -2.69100, -0.06800,   0.00000, 0.00000, -90.00000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "Railway", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.51600, -5.03800, -0.06800,   0.00000, 0.00000, -90.00000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, ""NAMEICRP"", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.50200, -5.07600, -0.06800,   0.00000, 0.00000, 90.00000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "Railway", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.50200, -2.73100, -0.06800,   0.00000, 0.00000, 90.00000);


		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.508,-2.711,-0.2040,0.000,0.000,-90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.508,-4.9320,-0.2040,0.000,0.000,-90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.494,-4.9320,-0.2040,0.000,0.000,90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF000000, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.494,-2.711,-0.2040,0.000,0.000,90.000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid,  -1.51600, -2.69100, -0.2040,   0.00000, 0.00000, -90.00000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, -1.51600, -4.9320, -0.2040,   0.00000, 0.00000, -90.00000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.50200, -4.9320, -0.2040,   0.00000, 0.00000, 90.00000);

		avtock[vehicleid] = CreateDynamicObject(19327,0.0, 0.0, -1000.0, 0.0, 0.0, 0.0, -1,  -1, -1, 300.0);
		SetDynamicObjectMaterialText(avtock[vehicleid], 0, "_____________", 130, "Georgia", 110, 1, 0xFF696969, 0, 1);
		AttachDynamicObjectToVehicle(avtock[vehicleid], vehicleid, 1.50200, -2.73100, -0.2040,   0.00000, 0.00000, 90.00000);

	}
	if(GetVehicleModel(vehicleid) == 512 && VehicleInfo[vehicleid][vTeam] == TEAM_LICENSERS && VehicleInfo[vehicleid][vPlayer] !=-1)
	{
		SendClientMessage(VehicleInfo[vehicleid][vPlayer],COLOR_RED,"[Совет]{FFFFFF}Вы сломали транспорт, который принадлежит министерству транспорта.");
		SendClientMessage(VehicleInfo[vehicleid][vPlayer],COLOR_RED,"[Совет]{FFFFFF}Работники этой организации выписали вам счет на оплату ущерба");
		SendClientMessage(VehicleInfo[vehicleid][vPlayer],COLOR_RED,"[Совет]{FFFFFF}Ваш кредитный счет пополнен на 15 000$. Оплатить его можно в банке.");
		PI[VehicleInfo[vehicleid][vPlayer]][pCredit]+=15000;
		FlyivingTest[VehicleInfo[vehicleid][vPlayer]] = 0;
		CarTest[VehicleInfo[vehicleid][vPlayer]] = -1;
	}
	VehicleInfo[vehicleid][vPlayer]=-1;
	if(VehicleInfo[vehicleid][vJob]>0)
	{
		foreach(i)
		{
			if(pTemp[i][pArendaCar]==vehicleid)
			{
				pTemp[i][pArendaCar] = -1;
				TimetoReturn[i]=0;
				DisablePlayerRaceCheckpoint(i);
				break;
			}
		}
		if(VehicleInfo[vehicleid][vJob] == 12 || (VehicleInfo[vehicleid][vJob]>=17 && VehicleInfo[vehicleid][vJob]<=20)) Fuel[vehicleid] = 100.0;
		if(VehicleInfo[vehicleid][vJob]==1) UpdateDynamic3DTextLabelText(AutobCarText[vehicleid], 0xFFFFFFFF, "{E06C1F}Автобус\n{73B461}[Для аренды]");
	}

	if(IsAPlane(vehicleid)) J_SetVehicleHealth(vehicleid,3000);
	else if(IsACopCar(vehicleid)) J_SetVehicleHealth(vehicleid,3000);
	else J_SetVehicleHealth(vehicleid,1000);

	if(IsAArendCar(vehicleid)) Fuel[vehicleid] = 100.0;
	if(VehicleInfo[vehicleid][vJob]==JOB_MECHANIC)
	{
		BenzinCena[vehicleid]=0.0;
		if(BenzinCount[vehicleid]>0)
		{
			BizInfo[Contracter[vehicleid]][bProducts]+=BenzinCount[vehicleid];
			UpdateFuels(Contracter[vehicleid]);
			BenzinCount[vehicleid] =0;
		}
		Contracter[vehicleid]=-1;
		UpdateDynamic3DTextLabelText(Benzin[vehicleid], 0xFFFFFFFF, "{57B22C}Заправка 0$\n{FFFFFF}Бензина: 0/1000");
	}
	if((VehicleInfo[vehicleid][vTeam] >=1 && VehicleInfo[vehicleid][vTeam]<11) || VehicleInfo[vehicleid][vTeam]>19) Fuel[vehicleid] = 100.0;
	if(IsAStripCar(vehicleid)) CarStrips[vehicleid] = 10;

	if(IsAVelik(vehicleid) || GetVehicleVirtualWorld(vehicleid) == 1228) SetEngineStatus(vehicleid,true, -1);
	else SetEngineStatus(vehicleid,false, -1);

	new vehid = GetVehicleID(vehicleid);

	if(!VehicleInfo[vehicleid][vTeam] && !VehicleInfo[vehicleid][vJob] && !IsAArendCar(vehicleid)) ModCar(vehicleid);

	if(IsAOwnableCar(vehicleid))
	{
		UpdateCarInfo(vehicleid);
		new carnnum[64];
		format(carnnum,sizeof(carnnum),"%s%s",NumberColors[CarInfo[vehid][cNumberColor]],CarInfo[vehid][cNumber]);
		SetVehicleNumberPlate(vehicleid,carnnum);
		ChangeVehicleColor(vehicleid, CarInfo[vehid][cColor_1], CarInfo[vehid][cColor_2]);
	}
	else
	{
		SetDoorsStatus(vehicleid, 0);
		CarInfo[vehid][cLock] = 0;
		if(VehicleInfo[vehicleid][vJob]!=0)VehicleInfo[vehid][vLock]=0;
	}
	if(LightsObject[vehicleid][0]!=-1 || LightsObject[vehicleid][1]!=-1)
	{
		DestroyDynamicObject(LightsObject[vehicleid][0]);
		DestroyDynamicObject(LightsObject[vehicleid][1]);
		LightsObject[vehicleid][0] = -1;
		LightsObject[vehicleid][1] = -1;
		SignalTick[vehicleid][0] = 0;
		SignalTick[vehicleid][1] = -1;
		Signal[vehicleid] = 0;
	}
	if(CarScrap[vehicleid] != -1)
	{
		DestroyDynamicObject(CarScrap[vehicleid]);
		CarScrap[vehicleid] = -1;
	}
	if(IsAArendCar(vehicleid))
	{
		ArendKey[ArendInfo[vehicleid-ArendCar[0]][aRentID]] = INVALID_VEHICLE_ID;
		ArendInfo[vehicleid-ArendCar[0]][aRentID] = INVALID_PLAYER_ID;
	}
	return true;
}

 

 

Share this post


Link to post
Share on other sites

и вот этот сток / паблик кинь 

ModCar

Share this post


Link to post
Share on other sites
1 минуту назад, DEST сказал:

и вот этот сток / паблик кинь 


ModCar
Спойлер

public ModCar(carid)
{
	if(GetVehicleModel( carid ) != TunInfo[ carid ][ nModel ])
	{
		TunInfo[ carid ][ nSpoiler ] = 0;
		TunInfo[ carid ][ nHood ] = 0;
		TunInfo[ carid ][ nNitro ] = 0;
		TunInfo[ carid ][ nLamps ] = 0;
		TunInfo[ carid ][ nExhaust ] = 0;
		TunInfo[ carid ][ nWheels ] = 0;
		TunInfo[ carid ][ nRoof ] = 0;
		TunInfo[ carid ][ nStereo ] = 0;
		TunInfo[ carid ][ nHydraulics ] = 0;
		TunInfo[ carid ][ nBullbar ] = 0;
		TunInfo[ carid ][ nRearBullbars ] = 0;
		TunInfo[ carid ][ nFrontSign ] = 0;
		TunInfo[ carid ][ nFrontBullbars ] = 0;
		TunInfo[ carid ][ nFrontBumper ] = 0;
		TunInfo[ carid ][ nRearBumper ] = 0;
		TunInfo[ carid ][ nVents] = 0;
		TunInfo[ carid ][ nModel ] = GetVehicleModel( carid );
		ResetTuning(carid);
		return true;
	}
	if(TunInfo[carid][nSpoiler] != 0) AddVehicleComponent(carid,TunInfo[carid][nSpoiler]);
	if(TunInfo[carid][nHood] != 0) AddVehicleComponent(carid,TunInfo[carid][nHood]);
	if(TunInfo[carid][nSideskirt] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nSideskirt]);
	if(TunInfo[carid][nNitro] != 0) AddVehicleComponent(carid,TunInfo[carid][nNitro]);
	if(TunInfo[carid][nLamps] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nLamps]);
	if(TunInfo[carid][nExhaust] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nExhaust]);
	if(TunInfo[carid][nWheels] != 0 )AddVehicleComponent(carid,TunInfo[carid][nWheels]);
	if(TunInfo[carid][nRoof] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nRoof]);
	if(TunInfo[carid][nStereo] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nStereo]);
	if(TunInfo[carid][nHydraulics] != 0 )AddVehicleComponent(carid,TunInfo[carid][nHydraulics]);
	if(TunInfo[carid][nBullbar] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nBullbar]);
	if(TunInfo[carid][nRearBullbars] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nRearBullbars]);
	if(TunInfo[carid][nFrontSign] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nFrontSign]);
	if(TunInfo[carid][nFrontBullbars] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nFrontBullbars]);
	if(TunInfo[carid][nFrontBumper] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nFrontBumper]);
	if(TunInfo[carid][nRearBumper] != 0) AddVehicleComponent(carid,TunInfo[carid][nRearBumper]);
	if(TunInfo[carid][nVents] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nVents]);
	if(TunInfo[carid][nPaintJob] != -1) ChangeVehiclePaintjob(carid,TunInfo[carid][nPaintJob]);
	for(new i; i<14; i++) ModVehicle(carid, GetVehicleComponentInSlot(carid,i));
	if(PerfomenceInfo[carid][Engine] > 0)TuningMod(carid);
	return true;
}
DelTunCar(carid)
{
	if(TunInfo[carid][nHydraulics]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nHydraulics]);
	if(TunInfo[carid][nSpoiler]!=0) RemoveVehicleComponent(carid,TunInfo[carid][nSpoiler]);
	if(TunInfo[carid][nHood]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nHood]);
	if(TunInfo[carid][nSideskirt]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nSideskirt]);
	if(TunInfo[carid][nNitro]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nNitro]);
	if(TunInfo[carid][nLamps]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nLamps]);
	if(TunInfo[carid][nExhaust]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nExhaust]);
	if(TunInfo[carid][nWheels]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nWheels]);
	if(TunInfo[carid][nRoof]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nRoof]);
	if(TunInfo[carid][nStereo]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nStereo]);
	if(TunInfo[carid][nBullbar]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nBullbar]);
	if(TunInfo[carid][nRearBullbars]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nRearBullbars]);
	if(TunInfo[carid][nFrontSign]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nFrontSign]);
	if(TunInfo[carid][nFrontBullbars]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nFrontBullbars]);
	if(TunInfo[carid][nFrontBumper] !=0)RemoveVehicleComponent(carid,TunInfo[carid][nFrontBumper]);
	if(TunInfo[carid][nRearBumper]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nRearBumper]);
	if(TunInfo[carid][nVents]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nVents]);
	if(TunInfo[carid][nPaintJob]!=-1)ChangeVehiclePaintjob(carid,-1);
	TunInfo[carid][nHydraulics] = 0;//
	TunInfo[carid][nSpoiler] = 0;//
	TunInfo[carid][nHood] = 0;//
	TunInfo[carid][nSideskirt] = 0;//
	TunInfo[carid][nNitro] = 0;//
	TunInfo[carid][nLamps] = 0;//
	TunInfo[carid][nExhaust] = 0;//
	TunInfo[carid][nWheels] = 0;//
	TunInfo[carid][nRoof] = 0;//
	TunInfo[carid][nStereo] = 0;//
	TunInfo[carid][nBullbar] = 0;//
	TunInfo[carid][nRearBullbars] = 0;//
	TunInfo[carid][nFrontSign] = 0;//
	TunInfo[carid][nFrontBullbars] = 0;//
	TunInfo[carid][nFrontBumper] = 0;//
	TunInfo[carid][nRearBumper] = 0;//
	TunInfo[carid][nVents] = 0;//
	TunInfo[carid][nPaintJob] = -1;//
	return true;
}
IsPlayerInHisVehicle(playerid)
{
	if(IsPlayerInAnyVehicle(playerid))
	{
		if(IsPlayerHaveCar(playerid,GetPlayerVehicleID(playerid))) return true;
	}
	return false;
}
SendGovMessage(playerid,result[])
{
	if(IsPlayerConnected(playerid))
	{
		new team = GetTeamID(playerid);
		new string[200];
		switch(team)
		{
		case TEAM_LSPD,TEAM_PDLV,TEAM_LVPD,TEAM_FBI,TEAM_SFPD,TEAM_M4C,TEAM_MEDICLV,TEAM_MERIALS,TEAM_MERIALV,TEAM_LICENSERS,TEAM_RADIO,TEAM_RADIOSF,TEAM_RADIOLV,TEAM_ARMY,TEAM_ARMYLV,TEAM_BANK,TEAM_ARMYSF:
			{
				format(string,sizeof(string),"Гос.Новости: %s[%d]: %s",Name(playerid),playerid,result);
				SendClientMessageToAll(COLOR_GOV, string);
			}
		default: return false;
		}
	}
	return true;
}

 

 

Share this post


Link to post
Share on other sites
43 минуты назад, Nargo сказал:

TunInfo

Все, что с этим связано также скидывай. 

Share this post


Link to post
Share on other sites
4 минуты назад, DEST сказал:

Все, что с этим связано также скидывай. 

Спойлер

LoadTuning()
{
	new string[256];
	new Cache:result = mysql_query(mysql, "SELECT * FROM `tuning`");
	if(cache_get_row_count(mysql) > 0)
	{
		for(new i = 1;i < ADD_VEHICLES; i++)
		{
			//ID = cache_get_row_int(i, 0, mysql);
			TunInfo[i][nModel] = cache_get_row_int(i-1, 1, mysql);
			TunInfo[i][nSpoiler] = cache_get_row_int(i-1, 2, mysql);
			TunInfo[i][nHood] = cache_get_row_int(i-1, 3, mysql);
			TunInfo[i][nSideskirt] = cache_get_row_int(i-1, 4, mysql);
			TunInfo[i][nNitro] = cache_get_row_int(i-1, 5, mysql);
			TunInfo[i][nLamps] = cache_get_row_int(i-1, 6, mysql);
			TunInfo[i][nExhaust] = cache_get_row_int(i-1, 7, mysql);
			TunInfo[i][nWheels] = cache_get_row_int(i-1, 8, mysql);
			TunInfo[i][nRoof] = cache_get_row_int(i-1, 9, mysql);
			TunInfo[i][nStereo] = cache_get_row_int(i-1, 10, mysql);
			TunInfo[i][nHydraulics] = cache_get_row_int(i-1, 11, mysql);
			TunInfo[i][nBullbar] = cache_get_row_int(i-1, 12, mysql);
			TunInfo[i][nRearBullbars] = cache_get_row_int(i-1, 13, mysql);
			TunInfo[i][nFrontSign] = cache_get_row_int(i-1, 14, mysql);
			TunInfo[i][nFrontBullbars] = cache_get_row_int(i-1, 15, mysql);
			TunInfo[i][nFrontBumper] = cache_get_row_int(i-1, 16, mysql);
			TunInfo[i][nRearBumper] = cache_get_row_int(i-1, 17, mysql);
			TunInfo[i][nVents] = cache_get_row_int(i-1, 18, mysql);
			TunInfo[i][nPaintJob] = cache_get_row_int(i-1, 19, mysql);
		}
	}
	else
	{
		for(new i = 1;i < MAX_VEHICLES;i ++)
		{
			format(string, sizeof(string), "INSERT INTO `tuning` (`Model`) VALUE ('%i')", GetVehicleModel(i));
			mysql_query(mysql, string, false);
		}
	}
	cache_delete(result, mysql);
	return true;
}
SaveTuning(carid, tunname[], tun)
{
	new string[150];
	format(string, sizeof(string), "UPDATE `tuning` SET `%s` = '%d' WHERE `ID` = '%i'", tunname, tun, carid);
	mysql_query(mysql, string, false);
	return true;
}
ResetTuningC(carid)
{
	new string[900];
	format(string,sizeof(string),"UPDATE `tuning` SET \
	`Spoiler` = '0',`Hood` = '0',`Sides` = '0', `Nitro` = '0',`Lamps` = '0',`Exhaust` = '0',`Wheels` = '0',`Roof` = '0',\
	`Stereo` = '0',`Hydraulics` = '0',`Bullbar` = '0',`RBullbars` = '0',`FSign` = '0',`FBullbars` = '0',`FBumper` = '0',\
	`RBumper` = '0',`Vents` = '0',`PaintJob` = '-1',`Model` = '0' WHERE `ID` = '%i'",carid);
	mysql_tquery(mysql, string);
	return true;
}
GetTuningName(componentid)
{
	new Name[20];
	switch(componentid)
	{
	case 1000..1003,1014..1016,1023,1049,1050,1058,1060,1138,1139,1146,1147,1158,1162..1164: Name = "Spoiler";
	case 1004,1005,1011,1012: Name = "Hood";
	case 1007,1017,1026,1027,1030,1031,1036,1039..1042,1047,1048,1051,1052,1056,1057,1062,1063,1069,1072,1090,1093..1095,1099,1101,1102,1106..1108,1119..1122,1124,1133,1134,1137: Name = "Sides";
	case 1008..1010: Name = "Nitro";
	case 1013,1024: Name = "Lamps";
	case 1018..1022,1028,1029,1034,1037,1043..1046,1059,1064.1066,1089,1092,1105,1113,1114,1126,1127,1129,1132,1135,1136: Name = "Exhaust";
	case 1025,1073..1085,1096..1098: Name = "Wheels";
	case 1006,1032,1033,1035,1038,1053..1055,1061,1067,1068,1088,1091,1103,1128,1130,1131: Name = "Roof";
	case 1086: Name = "Stereo";
	case 1087: Name = "Hydraulics";
	case 1100,1123,1125: Name = "Bullbar";
	case 1109,1110: Name = "RBullbars";
	case 1111,1112: Name = "FSign";
	case 1115,1116: Name = "FBullbars";
	case 1117,1152,1153,1155,1157,1160,1165,1166,1169..1174,1176,1179,1181,1182,1185,1188..1191: Name = "FBumper";
	case 1140,1141,1148..1151,1154,1156,1159,1161,1167,1168,1175,1177,1178,1180,1183,1184,1186,1187,1192,1193: Name = "RBumper";
	case 1142..1145: Name = "Vents";
	}
	return Name;
}
Спойлер


enum pPerfomenceInfo
{
	Engine,//Äâèãàòåëü
	Shock_absorbers,//Àìîðòèçàòîðû
	Bridge,//Ìîñò
	Discs,//Äèñêè
	Wheel,//êîëåñà
	ptStatus//Ñòàòóñ
};

stock Loadownablemash()
{
	new Cache:result = mysql_query(mysql, "SELECT * FROM `ownable`");
	OWNABLECARS = cache_get_row_count(mysql);
	for(new idx = 1;idx < OWNABLECARS; idx++)
	{
		TrunkInfo[idx][tMats] = cache_get_field_content_int(idx-1, "Guns", mysql);
		TrunkInfo[idx][tDrugs] = cache_get_field_content_int(idx-1, "Drugs", mysql);
		TrunkInfo[idx][tArmours] = cache_get_field_content_int(idx-1, "Armours", mysql);
		TrunkInfo[idx][tPackets] = cache_get_field_content_int(idx-1, "Packets", mysql);
		TrunkInfo[idx][tMoney] = cache_get_field_content_int(idx-1, "Moneys", mysql);
		TrunkInfo[idx][tKanistra] = cache_get_field_content_int(idx-1, "Kanistras", mysql);
		TrunkInfo[idx][tDee] = cache_get_field_content_int(idx-1, "Healts", mysql);
		CarInfo[idx][cVirt] = cache_get_field_content_int(idx-1, "Virt", mysql);

		PerfomenceInfo[idx][Engine] = cache_get_field_content_int(idx-1, "Engine", mysql);
		PerfomenceInfo[idx][Shock_absorbers] = cache_get_field_content_int(idx-1, "Shock_absorbers", mysql);
		PerfomenceInfo[idx][Bridge] = cache_get_field_content_int(idx-1, "Bridge", mysql);
		PerfomenceInfo[idx][Discs] = cache_get_field_content_int(idx-1, "Discs", mysql);
		PerfomenceInfo[idx][Wheel] = cache_get_field_content_int(idx-1, "Wheel", mysql);
	}
	cache_delete(result, mysql);
	return true;
}
SaveOwnableCar(carid)
{
	new string[700], string1[500];
	format(string, sizeof(string), "UPDATE `ownable` SET \
	`Model` = '%d', `Sell_X` = '%.4f', `Sell_Y` = '%.4f', `Sell_Z` = '%.4f', `Sell_A` = '%.4f', \
	`Pos_X` = '%.4f', `Pos_Y` = '%.4f', `Pos_Z` = '%.4f', `Pos_A` = '%.4f', `Color_1` = '%d', \
	`Color_2` = '%d', `Owner` = '%s', `Keyer` = '%s', `Shtrafer` = '%d', `Number` = '%s', \
	`Cost` = '%d', `Lock` = '%d', `Shtraf` = '%d', `KeyIN` = '%d', \
	`AlarmON` = '%d', `Milage` = '%f', `Virt` = '%d' WHERE `ID` = '%i'",
	CarInfo[carid][cModel],
	CarInfo[carid][cSell_X],
	CarInfo[carid][cSell_Y],
	CarInfo[carid][cSell_Z],
	CarInfo[carid][cSell_A],
	CarInfo[carid][cPos_X],
	CarInfo[carid][cPos_Y],
	CarInfo[carid][cPos_Z],
	CarInfo[carid][cPos_A],
	CarInfo[carid][cColor_1],
	CarInfo[carid][cColor_2],
	CarInfo[carid][cOwner],
	CarInfo[carid][cKeyer],
	CarInfo[carid][cShtrafer],
	CarInfo[carid][cNumber],
	CarInfo[carid][cCost],
	CarInfo[carid][cLock],
	CarInfo[carid][cShtraf],
	CarInfo[carid][cKeyIN],
	CarInfo[carid][cAlarmON],
	CarInfo[carid][cMilage],
	CarInfo[carid][cVirt],
	carid+1);

	format(string1, sizeof(string1), "UPDATE `ownable` SET \
	`Guns` = '%d', `Drugs` = '%d', `Armours` = '%d',\
	`Packets` = '%d', `Moneys` = '%d', `Kanistras` = '%d', `Healts` = '%d', `OnNumber`='%s', `Register`='%s', `OnRegister`='%s', `NumberColor`='%d', `Virt`='%d' WHERE `ID` = '%i'",
	TrunkInfo[carid][tMats],
	TrunkInfo[carid][tDrugs],
	TrunkInfo[carid][tArmours],
	TrunkInfo[carid][tPackets],
	TrunkInfo[carid][tMoney],
	TrunkInfo[carid][tKanistra],
	TrunkInfo[carid][tDee],
	CarInfo[carid][cOnNumber],
	CarInfo[carid][cRegister],
	CarInfo[carid][cOnRegister],
	CarInfo[carid][cNumberColor],
	CarInfo[carid][cVirt],
	carid);
	mysql_query(mysql, string, false);
	mysql_query(mysql, string1, false);
	return true;
}
stock SaveOwnableCars()
{
	for (new i = 0;i < OWNABLECARS;i ++) SaveOwnableCar(i);
	return true;
}

 

 

 

Share this post


Link to post
Share on other sites

в конец стока продажи (SellCar) добавить: 

PerfomenceInfo[number][Engine] = 0;
PerfomenceInfo[number][Shock_absorbers] = 0;
PerfomenceInfo[number][Bridge] = 0;
PerfomenceInfo[number][Discs] = 0;
PerfomenceInfo[number][Wheel] = 0; 

 

Share this post


Link to post
Share on other sites
3 минуты назад, DEST сказал:

в конец стока продажи (SellCar) добавить: 


PerfomenceInfo[number][Engine] = 0;
PerfomenceInfo[number][Shock_absorbers] = 0;
PerfomenceInfo[number][Bridge] = 0;
PerfomenceInfo[number][Discs] = 0;
PerfomenceInfo[number][Wheel] = 0; 

 

Сейчас попробую

12 минут назад, DEST сказал:

в конец стока продажи (SellCar) добавить: 


PerfomenceInfo[number][Engine] = 0;
PerfomenceInfo[number][Shock_absorbers] = 0;
PerfomenceInfo[number][Bridge] = 0;
PerfomenceInfo[number][Discs] = 0;
PerfomenceInfo[number][Wheel] = 0; 

 

Всё нормально скомпилилось но после продажи машины значения остаются те же

Share this post


Link to post
Share on other sites
2 часа назад, Nargo сказал:

PerfomenceInfo

теперь скидывайте все, что связано с этим. 

Share this post


Link to post
Share on other sites
9 минут назад, DEST сказал:

теперь скидывайте все, что связано с этим. 

Спойлер

SellCar(carid)
{
	new number = GetVehicleID(carid);
	CarInfo[number][cPos_X] = CarInfo[number][cSell_X];
	CarInfo[number][cPos_Y] = CarInfo[number][cSell_Y];
	CarInfo[number][cPos_Z] = CarInfo[number][cSell_Z];
	CarInfo[number][cPos_A] = CarInfo[number][cSell_A];
	CarInfo[number][cColor_1] = 1;
	CarInfo[number][cColor_2] = 1;
	SetString(CarInfo[number][cOwner], "The State");
	SetString(CarInfo[number][cKeyer], "The State");
	CarInfo[number][cShtrafer] = 0;
	SetString(CarInfo[number][cNumber],"SA");
	ReSetCarPrice(number);
	CarInfo[number][cLock] = 0;
	CarInfo[number][cShtraf] = 0;
	CarInfo[number][cKeyIN] = 0;
	CarInfo[number][cAlarmON] = 0;
	CarInfo[number][cMilage] = 0;
    PerfomenceInfo[number][Engine] = 0;
    PerfomenceInfo[number][Shock_absorbers] = 0;
    PerfomenceInfo[number][Bridge] = 0;
    PerfomenceInfo[number][Discs] = 0;
    PerfomenceInfo[number][Wheel] = 0;
	//CarInfo[number][cInt] = 0;

	CarInfo[number][cNumberColor] = 0;
	SetString(CarInfo[number][cOnNumber],"The State");
	SetString(CarInfo[number][cOnRegister],"The State");
	SetString(CarInfo[number][cRegister],"The State");
	DestroyVehicleEx(carid);
	J_AddStaticVehicleEx(CarInfo[number][cModel],CarInfo[number][cPos_X],CarInfo[number][cPos_Y],CarInfo[number][cPos_Z],CarInfo[number][cPos_A],CarInfo[number][cColor_1],CarInfo[number][cColor_1],100000);
	//SetVehicleNumberPlate(carid,"SA");
	VehicleInfo[carid][vAntiRepair]=2;
	VehicleHealth[carid] = 1000;
	DelTunCar(carid);
	SetVehicleVirtualWorld(number, 0);
	LinkVehicleToInterior(number, 0);
	SetVehicleToRespawn(carid);
	SaveOwnableCar(number);
	return true;
}
Спойлер


public ModCar(carid)
{
	if(GetVehicleModel( carid ) != TunInfo[ carid ][ nModel ])
	{
		TunInfo[ carid ][ nSpoiler ] = 0;
		TunInfo[ carid ][ nHood ] = 0;
		TunInfo[ carid ][ nNitro ] = 0;
		TunInfo[ carid ][ nLamps ] = 0;
		TunInfo[ carid ][ nExhaust ] = 0;
		TunInfo[ carid ][ nWheels ] = 0;
		TunInfo[ carid ][ nRoof ] = 0;
		TunInfo[ carid ][ nStereo ] = 0;
		TunInfo[ carid ][ nHydraulics ] = 0;
		TunInfo[ carid ][ nBullbar ] = 0;
		TunInfo[ carid ][ nRearBullbars ] = 0;
		TunInfo[ carid ][ nFrontSign ] = 0;
		TunInfo[ carid ][ nFrontBullbars ] = 0;
		TunInfo[ carid ][ nFrontBumper ] = 0;
		TunInfo[ carid ][ nRearBumper ] = 0;
		TunInfo[ carid ][ nVents] = 0;
		TunInfo[ carid ][ nModel ] = GetVehicleModel( carid );
		ResetTuning(carid);
		return true;
	}
	if(TunInfo[carid][nSpoiler] != 0) AddVehicleComponent(carid,TunInfo[carid][nSpoiler]);
	if(TunInfo[carid][nHood] != 0) AddVehicleComponent(carid,TunInfo[carid][nHood]);
	if(TunInfo[carid][nSideskirt] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nSideskirt]);
	if(TunInfo[carid][nNitro] != 0) AddVehicleComponent(carid,TunInfo[carid][nNitro]);
	if(TunInfo[carid][nLamps] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nLamps]);
	if(TunInfo[carid][nExhaust] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nExhaust]);
	if(TunInfo[carid][nWheels] != 0 )AddVehicleComponent(carid,TunInfo[carid][nWheels]);
	if(TunInfo[carid][nRoof] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nRoof]);
	if(TunInfo[carid][nStereo] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nStereo]);
	if(TunInfo[carid][nHydraulics] != 0 )AddVehicleComponent(carid,TunInfo[carid][nHydraulics]);
	if(TunInfo[carid][nBullbar] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nBullbar]);
	if(TunInfo[carid][nRearBullbars] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nRearBullbars]);
	if(TunInfo[carid][nFrontSign] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nFrontSign]);
	if(TunInfo[carid][nFrontBullbars] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nFrontBullbars]);
	if(TunInfo[carid][nFrontBumper] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nFrontBumper]);
	if(TunInfo[carid][nRearBumper] != 0) AddVehicleComponent(carid,TunInfo[carid][nRearBumper]);
	if(TunInfo[carid][nVents] != 0 ) AddVehicleComponent(carid,TunInfo[carid][nVents]);
	if(TunInfo[carid][nPaintJob] != -1) ChangeVehiclePaintjob(carid,TunInfo[carid][nPaintJob]);
	for(new i; i<14; i++) ModVehicle(carid, GetVehicleComponentInSlot(carid,i));
	if(PerfomenceInfo[carid][Engine] > 0)TuningMod(carid);
	return true;
}
DelTunCar(carid)
{
	if(TunInfo[carid][nHydraulics]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nHydraulics]);
	if(TunInfo[carid][nSpoiler]!=0) RemoveVehicleComponent(carid,TunInfo[carid][nSpoiler]);
	if(TunInfo[carid][nHood]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nHood]);
	if(TunInfo[carid][nSideskirt]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nSideskirt]);
	if(TunInfo[carid][nNitro]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nNitro]);
	if(TunInfo[carid][nLamps]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nLamps]);
	if(TunInfo[carid][nExhaust]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nExhaust]);
	if(TunInfo[carid][nWheels]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nWheels]);
	if(TunInfo[carid][nRoof]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nRoof]);
	if(TunInfo[carid][nStereo]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nStereo]);
	if(TunInfo[carid][nBullbar]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nBullbar]);
	if(TunInfo[carid][nRearBullbars]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nRearBullbars]);
	if(TunInfo[carid][nFrontSign]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nFrontSign]);
	if(TunInfo[carid][nFrontBullbars]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nFrontBullbars]);
	if(TunInfo[carid][nFrontBumper] !=0)RemoveVehicleComponent(carid,TunInfo[carid][nFrontBumper]);
	if(TunInfo[carid][nRearBumper]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nRearBumper]);
	if(TunInfo[carid][nVents]!=0)RemoveVehicleComponent(carid,TunInfo[carid][nVents]);
	if(TunInfo[carid][nPaintJob]!=-1)ChangeVehiclePaintjob(carid,-1);
	TunInfo[carid][nHydraulics] = 0;//
	TunInfo[carid][nSpoiler] = 0;//
	TunInfo[carid][nHood] = 0;//
	TunInfo[carid][nSideskirt] = 0;//
	TunInfo[carid][nNitro] = 0;//
	TunInfo[carid][nLamps] = 0;//
	TunInfo[carid][nExhaust] = 0;//
	TunInfo[carid][nWheels] = 0;//
	TunInfo[carid][nRoof] = 0;//
	TunInfo[carid][nStereo] = 0;//
	TunInfo[carid][nBullbar] = 0;//
	TunInfo[carid][nRearBullbars] = 0;//
	TunInfo[carid][nFrontSign] = 0;//
	TunInfo[carid][nFrontBullbars] = 0;//
	TunInfo[carid][nFrontBumper] = 0;//
	TunInfo[carid][nRearBumper] = 0;//
	TunInfo[carid][nVents] = 0;//
	TunInfo[carid][nPaintJob] = -1;//
	return true;
}

 

 

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Radmiz
      By Radmiz
          if(pickupid == sadpick){         if(GetPVarInt(playerid,"Sadov") == 0) {             SetPVarInt(playerid,"Sadov", 1);             SetPlayerSkin(playerid, 73);             SetPlayerCheckpoint(playerid,2157.0464,-1707.6362,15.0859,3.0);               SendClientMessage(playerid,0x00ff39,"Âû óñòðîèëèñü íà ðàáîòó ñàäîâíèêà");               SendClientMessage(playerid,0xfeff00,"Çà 1 ïîñàæàíûé êóñò âàì áóäóò ïëàòèòü ïî 345$");         }         else {             PI[playerid][pCash] += GetPVarInt(playerid,"SadovM")*345;             SetPlayerSkin(playerid,PI[playerid][pSkin]);             ClearAnimations(playerid);             DeletePVar(playerid,"Sadov");             DeletePVar(playerid,"SadovM");             DeletePVar(playerid,"SadovW");             SendClientMessage(playerid,0xff0000,"Âû óâîëèëèñü ñ ðàáîòû ñàäîâíèêà");             DisablePlayerCheckpoint(playerid);  
      я хз что за иероглифы