Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

баг с 0id в Samp-Simple помогайте

Статус
В этой теме нельзя размещать новые ответы.

Brunka

Новичок
Здравствуйте всем, все уже знают что слили мод Samp-Simple но вот есть один баг с 0id, если у вас 0id, то при нажатии клавижи Y, продается автомобиль, если не 0id то все нормально, если кто исправил данный баг, помогите!

Код при котором срабатывает продажа:
PHP:
			PlayerInfo[playerid][pCar][GetPVarInt(playerid,"pSlotProdCar")] = PlayerInfo[offerid][pCar][GetPVarInt(playerid,"pSlotPlProd")];
			PlayerInfo[offerid][pCar][GetPVarInt(playerid,"pSlotPlProd")] = 462;
			if(GetPVarInt(playerid,"pSlotPlProd") == 0) SetPlayerInt(offerid, "pCar", PlayerInfo[offerid][pCar][GetPVarInt(playerid,"pSlotProdCar")]);
			else if(GetPVarInt(playerid,"pSlotPlProd") == 1) SetPlayerInt(offerid, "pCar2", PlayerInfo[offerid][pCar][GetPVarInt(playerid,"pSlotProdCar")]);
			if(GetPVarInt(playerid,"pSlotProdCar") == 0) SetPlayerInt(playerid, "pCar", PlayerInfo[playerid][pCar][GetPVarInt(playerid,"pSlotProdCar")]);
			else if(GetPVarInt(playerid,"pSlotProdCar") == 1) SetPlayerInt(playerid, "pCar2", PlayerInfo[playerid][pCar][GetPVarInt(playerid,"pSlotProdCar")]);
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][0]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][0];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][1]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][1];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][2]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][2];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][3]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][3];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][4]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][4];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][5]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][5];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][6]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][6];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][7]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][7];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][8]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][8];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][9]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][9];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][10]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][10];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][11]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][11];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][12]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][12];
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][13]=cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][13];
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][0]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][1]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][2]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][3]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][4]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][5]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][6]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][7]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][8]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][9]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][10]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][11]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][12]=0;
			cVehcoms[offerid][GetPVarInt(playerid,"pSlotPlProd")][13]=0;
			format(cVehcom[offerid][GetPVarInt(offerid,"pSlotPlProd")],74,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][0],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][1],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][2],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][3],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][4],
			cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][5],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][6],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][7],
			cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][8],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][9],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][10],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][11],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][12],cVehcoms[offerid][GetPVarInt(offerid,"pSlotPlProd")][13]);
			if(GetPVarInt(offerid,"pSlotPlProd") == 0) SetPlayerStr(offerid, "cVehcom", cVehcom[offerid][GetPVarInt(offerid,"pSlotPlProd")]);
			else if(GetPVarInt(offerid,"pSlotPlProd") == 1) SetPlayerStr(offerid, "cVehcom2", cVehcom[offerid][GetPVarInt(offerid,"pSlotPlProd")]);
			format(cVehcom[playerid][GetPVarInt(playerid,"pSlotProdCar")],74,"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][0],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][1],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][2],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][3],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][4],
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][5],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][6],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][7],
			cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][8],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][9],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][10],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][11],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][12],cVehcoms[playerid][GetPVarInt(playerid,"pSlotProdCar")][13]);
			if(GetPVarInt(playerid,"pSlotProdCar") == 0) SetPlayerStr(playerid, "cVehcom", cVehcom[playerid][GetPVarInt(playerid,"pSlotProdCar")]);
			if(GetPVarInt(playerid,"pSlotProdCar") == 1) SetPlayerStr(playerid, "cVehcom2", cVehcom[playerid][GetPVarInt(playerid,"pSlotProdCar")]);
			LoadCarPlayerId(playerid,GetPVarInt(playerid,"pSlotProdCar")+1);
			LoadCarPlayerId(offerid,GetPVarInt(playerid,"pSlotPlProd")+1);
			PlayerInfo[offerid][pCash] +=price;
			PlayerInfo[playerid][pCash] -= price;
			SendClientMessage(playerid,CGREEN,"Ïîçäðàâëÿåì âû êóïèëè ò/ñ.");
			SendClientMessage(offerid,CGREEN,"ò/ñ ïðîäàííî");
			DeletePVar(playerid, "pSellCarProd");
			DeletePVar(playerid, "pSellCarTo");
			DeletePVar(playerid, "pSellCarPrice");
			DeletePVar(playerid, "pSlotProdCar");
		}
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу