SA-MP Forums Archive
OnPlayerEditDynamicObject error (26) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerEditDynamicObject error (26) (/showthread.php?tid=646164)



OnPlayerEditDynamicObject error (26) - reddoxx - 11.12.2017

Код:
public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz)
{
	if(g_ObjectetEditel[playerid] != objectid)
	{
	    g_ObjectetEditel[playerid] = NINCS;
	    return false;
	}
	if(GetPVarInt(playerid, "vObjEdit") == VOBJ_EDIT_RENDORVILLOGO)
	{
	    if(response == EDIT_RESPONSE_FINAL)
		{
		    new kocsi = GetPlayerVehicleID(playerid),
				jarmuidje = JarmuID(kocsi, playerid);

			new Float:ofx, Float:ofy, Float:ofz, Float:ofaz;
			new Float:finalx, Float:finaly;
			new Float:px, Float:py, Float:pz, Float:roz;
			GetVehiclePos(vInfo[jarmuidje][vID], px, py, pz);
			GetVehicleZAngle(vInfo[jarmuidje][vID], roz);
			ofx = fX-px;
			ofy = fY-py;
			ofz = fZ-pz;
			ofaz = fRotZ-roz;
			finalx = ofx*floatcos(roz, degrees)+ofy*floatsin(roz, degrees);
			finaly = -ofx*floatsin(roz, degrees)+ofy*floatcos(roz, degrees);

			AttachDynamicObjectToVehicle(vInfo[jarmuidje][vVillogo], vInfo[jarmuidje][vID], finalx, finaly, ofz, fRotX, fRotY, ofaz);

			SetPVarInt(playerid, "vObjEdit", 0);
			UnFreeze(playerid);
			return 1;
		}
		else if(response == EDIT_RESPONSE_CANCEL)
		{
		    new kocsi = GetPlayerVehicleID(playerid),
				jarmuidje = JarmuID(kocsi, playerid);

			DestroyDynamicObject(vInfo[jarmuidje][vVillogo]);
			SetPVarInt(playerid, "vObjEdit", 0);
			UnFreeze(playerid);
			return 1;
		}
	}
	else if(GetPVarInt(playerid, "vObjEdit") == VOBJ_EDIT_TAXI)
	{
	    if(response == EDIT_RESPONSE_FINAL)
		{
		    new kocsi = GetPlayerVehicleID(playerid),
				jarmuidje = JarmuID(kocsi, playerid);

			new Float:ofx, Float:ofy, Float:ofz, Float:ofaz;
			new Float:finalx, Float:finaly;
			new Float:px, Float:py, Float:pz, Float:roz;
			GetVehiclePos(vInfo[jarmuidje][vID], px, py, pz);
			GetVehicleZAngle(vInfo[jarmuidje][vID], roz);
			ofx = fX-px;
			ofy = fY-py;
			ofz = fZ-pz;
			ofaz = fRotZ-roz;
			finalx = ofx*floatcos(roz, degrees)+ofy*floatsin(roz, degrees);
			finaly = -ofx*floatsin(roz, degrees)+ofy*floatcos(roz, degrees);

			AttachDynamicObjectToVehicle(vInfo[jarmuidje][vTaxi], vInfo[jarmuidje][vID], finalx, finaly, ofz, fRotX, fRotY, ofaz);
			
			SetPVarInt(playerid, "vObjEdit", 0);
			UnFreeze(playerid);
			return 1;
		}
		else if(response == EDIT_RESPONSE_CANCEL)
		{
		    new kocsi = GetPlayerVehicleID(playerid),
				jarmuidje = JarmuID(kocsi, playerid);

			DestroyDynamicObject(vInfo[jarmuidje][vTaxi]);
			SetPVarInt(playerid, "vObjEdit", 0);
			UnFreeze(playerid);
			return 1;
		}
	}
	else
	{
		if(response == EDIT_RESPONSE_FINAL)
		{
			new fid = FrakcioID(PlayerInfo[playerid][pFrakcioKezeles]);
			if(fid != NINCS)
			{
				if(FInfo[fid][fObjectID] == objectid)
				{
					PlayerInfo[playerid][pFrakcioKezeles] = -1;

					FInfo[fid][fSzefPos][0] = fX;
					FInfo[fid][fSzefPos][1] = fY;
					FInfo[fid][fSzefPos][2] = fZ;

					FInfo[fid][fSzefPosR][0] = fRotX;
					FInfo[fid][fSzefPosR][1] = fRotY;
					FInfo[fid][fSzefPosR][2] = fRotZ;
					FkUpdate(fid, fuSzefObject);

					SFM(playerid, COL_MKEK, "%s frakciу szйf pozнciуja sikeresen elmentve!", FInfo[fid][fNev]);
					return true;
				}
			}
			if(objectid == GraffitiObjectLerakas[playerid])
			{
				AddTag(fX,fY,fZ,fRotX,fRotY,fRotZ);
				DestroyDynamicObject(GraffitiObjectLerakas[playerid]);
				GraffitiObjectLerakas[playerid] = 0;
				SCM(playerid,COL_LRED, "Grafiti Lerakva!");
				return 1;
			}
			if(objectid == HifiObjectLerakas[playerid])
			{
				DestroyDynamicObject(HifiObjectLerakas[playerid]);
				HifiObjectLerakas[playerid] = 0;
				HifiLerak(playerid,fX,fY,fZ,fRotX,fRotY,fRotZ);
				return true;
			}
			if(AutomataID[playerid] > NINCS)
			{
				new auid = AutomataID[playerid];

				AutomataInfo[auid][aupos][0] = fX;
				AutomataInfo[auid][aupos][1] = fY;
				AutomataInfo[auid][aupos][2] = fZ;
				AutomataInfo[auid][aupos][3] = fRotX;
				AutomataInfo[auid][aupos][4] = fRotY;
				AutomataInfo[auid][aupos][5] = fRotZ;

				//if(AutomataInfo[auid][autipus] == 2)
				//{
				//	if(IsValidDynamic3DTextLabel(AutomataInfo[auid][autext])) DestroyDynamic3DTextLabel(AutomataInfo[auid][autext]);
				//	AutomataInfo[auid][autext] = CreateDynamic3DTextLabel("(( /menь ))", COLOR_MKEK, fX, fY, fZ, 40.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0);
				//}

				SetDynamicObjectPos(AutomataInfo[auid][auobject], fX, fY, fZ);
				SetDynamicObjectRot(AutomataInfo[auid][auobject], fRotX, fRotY, fRotZ);

				//DestroyDynamicObject(AutomataInfo[auid][auobject]);
				//AutomataInfo[auid][auobject] = CreateDynamicObject(AutomataModel(AutomataInfo[auid][autipus]), fX, fY, fZ, fRotX, fRotY, fRotZ, AutomataInfo[auid][auVW], AutomataInfo[auid][auInt]);
				Streamer_Update(playerid);
				AutomataInfo[auid][auszerkeszti] = false;
				AutomataInfo[auid][auhasznalva] = true;
				SCM(playerid, COL_VZOLD, "Automata pozнciуja sikeresen elmentve!");
				AutomataID[playerid] = NINCS;

				new qry[1024];
				format(qry, 1024, "UPDATE `"#LSQL_AUTOMATA_TABLA"` SET aupenz='%d', auposx='%f', auposy='%f', auposz='%f', aurotx='%f', auroty='%f', aurotz='%f', vw='%d', int='%d' WHERE id='%d'", AutomataInfo[auid][aupenz], fX, fY, fZ, fRotX, fRotY, fRotZ, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), auid);

				new DB:db = db_open(LSQL_ADATBAZIS);
				db_free_result(db_query(db, qry));
				db_close(db);

				return true;
			}

		    if(KapuID[playerid] != NINCS)
		    {
		        switch(SzerkesztesAllas[playerid])
			    {
					case 1:
					{
						Kapu[KapuID[playerid]][kZPos][0] = fX;
						Kapu[KapuID[playerid]][kZPos][1] = fY;
						Kapu[KapuID[playerid]][kZPos][2] = fZ;

						Kapu[KapuID[playerid]][kZRPos][0] = fRotX;
						Kapu[KapuID[playerid]][kZRPos][1] = fRotY;
						Kapu[KapuID[playerid]][kZRPos][2] = fRotZ;

						SzerkesztesAllas[playerid] = 2;
						EditDynamicObject(playerid, Kapu[KapuID[playerid]][kOID]);

						SCM(playerid, COL_MKEK, "Zбrt pozнciу sikeresen elmentve!");
						SCM(playerid, COL_MKEK, "Most kйrlek бllнtsd be йs mentsd el a kapu nyitott бllapotбt!");
					    return true;
					}
					case 2:
					{
					    Kapu[KapuID[playerid]][kNPos][0] = fX;
						Kapu[KapuID[playerid]][kNPos][1] = fY;
						Kapu[KapuID[playerid]][kNPos][2] = fZ;

						Kapu[KapuID[playerid]][kNRPos][0] = fRotX;
						Kapu[KapuID[playerid]][kNRPos][1] = fRotY;
						Kapu[KapuID[playerid]][kNRPos][2] = fRotZ;
						Kapu[KapuID[playerid]][kMozgo] = true;
						Kapu[KapuID[playerid]][kSzerkeszt] = false;

						new querycske[2048], hasznalocska[128], i = NINCS, numero = GetHasznaloNum(KapuID[playerid]);
						for(;++i < MAX_KAPU_HASZNALO;)
						{
						    if(Kapu[KapuID[playerid]][kHasznalo][i] > 0)
						    {
								format(hasznalocska, sizeof(hasznalocska), "%s%d%s", hasznalocska, Kapu[KapuID[playerid]][kHasznalo][i], (numero > i + 1 ? (",") : ("")));
						    }
						}

						format(querycske, sizeof(querycske), "INSERT INTO `"#MYSQL_KAPU_TABLA"` (ID, Nev, Model, Tav, Speed, Pos, NPos, NRPos, ZPos, ZRPos, Hasznalo, nyit, Vw, Kod)");
						format(querycske, sizeof(querycske), "%s VALUES('%d',", querycske, KapuID[playerid]);
						format(querycske, sizeof(querycske), "%s'%s','%d',", querycske, Kapu[KapuID[playerid]][kNev], Kapu[KapuID[playerid]][kModel]);
						format(querycske, sizeof(querycske), "%s'%f','3',", querycske, Kapu[KapuID[playerid]][kTav]);
						format(querycske, sizeof(querycske), "%s'%f,%f,%f',", querycske, PosExt(Kapu[KapuID[playerid]][kZPos]));
						format(querycske, sizeof(querycske), "%s'%f,%f,%f',", querycske, PosExt(Kapu[KapuID[playerid]][kNPos]));
						format(querycske, sizeof(querycske), "%s'%f,%f,%f',", querycske, PosExt(Kapu[KapuID[playerid]][kNRPos]));
						format(querycske, sizeof(querycske), "%s'%f,%f,%f',", querycske, PosExt(Kapu[KapuID[playerid]][kZPos]));
						format(querycske, sizeof(querycske), "%s'%f,%f,%f',", querycske, PosExt(Kapu[KapuID[playerid]][kZRPos]));
						format(querycske, sizeof(querycske), "%s'%s','0','%d',", querycske, (strlen(hasznalocska) > 0 ? hasznalocska : ("0")), GetPlayerVirtualWorld(playerid));
						format(querycske, sizeof(querycske), "%s'%d')", querycske, Kapu[KapuID[playerid]][kKod]);
						//mysql_function_query(sql_ID, querycske, false, "", "");
						mysql_tquery(sql_ID, querycske, "", "");

						if(Kapu[KapuID[playerid]][kKod] > NINCS)
							AdminUzenet(COLOR_LIGHTRED, 1, "%s lйtrehozott egy kaput! Obj: %d | Kуd: %d | Folyamat: EDO", JatekosNev(playerid), Kapu[KapuID[playerid]][kModel], Kapu[KapuID[playerid]][kKod]);
						else
						    AdminUzenet(COLOR_LIGHTRED, 1, "%s lйtrehozott egy kaput! Obj: %d | Fk: %s | Folyamat: EDO", JatekosNev(playerid), Kapu[KapuID[playerid]][kModel], hasznalocska);

	                    SCM(playerid, COL_MKEK, "Kapu zбrt йs nyitott бllapota sikeresen elmentve!");
						SetDynamicObjectPos(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZPos]));
						SetDynamicObjectRot(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZRPos]));

						SzerkesztesAllas[playerid] = NINCS;
						KapuID[playerid] = NINCS;
					    return true;
					}
					case 3:
					{
						Kapu[KapuID[playerid]][kZPos][0] = fX;
						Kapu[KapuID[playerid]][kZPos][1] = fY;
						Kapu[KapuID[playerid]][kZPos][2] = fZ;

						Kapu[KapuID[playerid]][kZRPos][0] = fRotX;
						Kapu[KapuID[playerid]][kZRPos][1] = fRotY;
						Kapu[KapuID[playerid]][kZRPos][2] = fRotZ;

						Kapu[KapuID[playerid]][kSzerkeszt] = false;

						new querycske[256];
						format(querycske, sizeof(querycske), "UPDATE `"#MYSQL_KAPU_TABLA"` SET ZPos = '%f,%f,%f', ZRPos = '%f,%f,%f' WHERE ID = '%d'", PosExt(Kapu[KapuID[playerid]][kZPos]), PosExt(Kapu[KapuID[playerid]][kZRPos]), KapuID[playerid]);
						//mysql_function_query(sql_ID, querycske, false, "", "");
						mysql_tquery(sql_ID, querycske, "", "");

						KapuID[playerid] = NINCS;
						SCM(playerid, COL_MKEK, "Kapu zбrt бllapota sikeresen frissнtve!");
					    return true;
					}
					case 4:
					{
					    Kapu[KapuID[playerid]][kNPos][0] = fX;
						Kapu[KapuID[playerid]][kNPos][1] = fY;
						Kapu[KapuID[playerid]][kNPos][2] = fZ;

						Kapu[KapuID[playerid]][kNRPos][0] = fRotX;
						Kapu[KapuID[playerid]][kNRPos][1] = fRotY;
						Kapu[KapuID[playerid]][kNRPos][2] = fRotZ;

						Kapu[KapuID[playerid]][kSzerkeszt] = false;

						new querycske[256];
						format(querycske, sizeof(querycske), "UPDATE `"#MYSQL_KAPU_TABLA"` SET NPos = '%f,%f,%f', NRPos = '%f,%f,%f' WHERE ID = '%d'", PosExt(Kapu[KapuID[playerid]][kNPos]), PosExt(Kapu[KapuID[playerid]][kNRPos]), KapuID[playerid]);
						//mysql_function_query(sql_ID, querycske, false, "", "");
						mysql_tquery(sql_ID, querycske, "", "");

						SetDynamicObjectPos(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZPos]));
						SetDynamicObjectRot(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZRPos]));

						KapuID[playerid] = NINCS;
						SCM(playerid, COL_MKEK, "Kapu nyitott бllapota sikeresen frissнtve!");
					    return true;
					}
			    }
			}
			new querycske[1024],formatalunk[512],
			kategoria[48],penz,nev[48],
			butorszam = ButorObjectID(objectid);

			if(!ButorInfo[butorszam][butorMegveve])
			{
				switch(ButorInfo[butorszam][butorTipus])
				{
					case 1:
					{
						kategoria = "Asztal";
						penz = Butor_Asztal[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Asztal[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 2:
					{
						kategoria = "Ьlőgarnitъra";
						penz = Butor_Ulogarnitura[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Ulogarnitura[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 3:
					{
						kategoria = "Festmйnyek, kйpek";
						penz = Butor_Kepek[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Kepek[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 4:
					{
						kategoria = "Lбmpбk";
						penz = Butor_Lampak[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Lampak[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 5:
					{
						kategoria = "TV-k";
						penz = Butor_TV[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_TV[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 6:
					{
						kategoria = "DVD-k, HiFi-k";
						penz = Butor_DVDHiFi[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_DVDHiFi[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 7:
					{
						kategoria = "Hangfal";
						penz = Butor_Hangfal[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Hangfal[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 8:
					{
						kategoria = "Szekrйny";
						penz = Butor_Szekreny[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Szekreny[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 9:
					{
						kategoria = "Fotel";
						penz = Butor_Fotel[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Fotel[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 10:
					{
						kategoria = "Konyhabъtor";
						penz = Butor_Konyhabutor[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Konyhabutor[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 11:
					{
						kategoria = "Hűtő";
						penz = Butor_Huto[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Huto[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 12:
					{
						kategoria = "Szбmнtуgйp";
						penz = Butor_Szamitogep[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Szamitogep[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 13:
					{
						kategoria = "Ajtу";
						penz = Butor_Ajto[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Ajto[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 14:
					{
						kategoria = "Mosуgйp";
						penz = Butor_Mosogep[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Mosogep[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 15:
					{
						kategoria = "Nyomtatу";
						penz = Butor_Nyomtato[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Nyomtato[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 16:
					{
						kategoria = "Бgy";
						penz = Butor_Agy[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Agy[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 17:
					{
						kategoria = "WC";
						penz = Butor_WC[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_WC[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 18:
					{
						kategoria = "Zuhanyzу";
						penz = Butor_Zuhanyzo[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Zuhanyzo[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 19:
					{
						kategoria = "Mosdу";
						penz = Butor_Mosdo[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Mosdo[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 20:
					{
						kategoria = "Szőnyeg";
						penz = Butor_Szonyeg[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Szonyeg[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 21:
					{
						kategoria = "Szйk";
						penz = Butor_Szek[ButorInfo[butorszam][butorListitem]][butorNEV];
						format(nev, sizeof(nev), Butor_Szek[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 22:
					{
						kategoria = "Нrуasztal";
						penz = Butor_Iroasztal[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Iroasztal[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 23:
					{
						kategoria = "Fal";
						penz = Butor_Fal[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Fal[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
					case 24:
					{
						kategoria = "Szйf";
						penz = Butor_Szef[ButorInfo[butorszam][butorListitem]][butorAR];
						format(nev, sizeof(nev), Butor_Szef[ButorInfo[butorszam][butorListitem]][butorNEV]);
					}
				}

				ButorInfo[butorszam][butorPosX] = fX;
				ButorInfo[butorszam][butorPosY] = fY;
				ButorInfo[butorszam][butorPosZ] = fZ;
				ButorInfo[butorszam][butorPosRX] = fRotX;
				ButorInfo[butorszam][butorPosRY] = fRotY;
				ButorInfo[butorszam][butorPosRZ] = fRotZ;

				PlayerInfo[playerid][pSzButor] = butorszam;
				format(formatalunk, sizeof(formatalunk), #COL_FEHER"Biztos, hogy meg akarod venni a kцvetkező bъtort?\n\n\n"#COL_VKEK"Bъtor kategуriбja: "#COL_FEHER"%s\n"#COL_VKEK"Bъtor neve: "#COL_FEHER"%s\n"#COL_VKEK"Bъtor бra: "#COL_FEHER"%d$", kategoria, nev, penz);
				ShowPlayerDialog(playerid, DIALOG_BUTOR_MEGVETEL, DIALOG_STYLE_MSGBOX, #COL_FEHER"Bъtor "#COL_VKEK"megvйtele", formatalunk, "Biztos!", "Mйgse!");
				return true;
			}
			format(querycske, sizeof(querycske), "UPDATE `butorok` SET butorPosX = '%.2f', butorPosY = '%.2f', butorPosZ = '%.2f', butorPosRX = '%.2f', butorPosRY = '%.2f', butorPosRZ = '%.2f' WHERE id = '%d'", fX, fY, fZ, fRotX, fRotY, fRotZ, butorszam);
			//mysql_function_query(sql_ID, querycske, false, "", "");
			mysql_tquery(sql_ID, querycske, "", "");

			SCM(playerid, COL_MKEK, "Sikeresen elmentetted a bъtort!");
		}

		if(response == EDIT_RESPONSE_CANCEL)
		{
		    if(objectid == HifiObjectLerakas[playerid])
		    {
				PlayerInfo[playerid][pCuccok][BL_HIFI]++;
				DestroyDynamicObject(HifiObjectLerakas[playerid]);
				SCM(playerid,COL_LRED,"Akkor mйgse rakj le..");
				return true;
		    }
			if(objectid == GraffitiObjectLerakas[playerid])
			{
				DestroyDynamicObject(GraffitiObjectLerakas[playerid]);
				GraffitiObjectLerakas[playerid] = 0;
				SCM(playerid,COL_LRED, "Grafiti lerakбsi kнsйrlet tцrцlve!");
				return 1;
			}
		    if(KapuID[playerid] != NINCS)
		    {
			    if((SzerkesztesAllas[playerid] == 1 || SzerkesztesAllas[playerid] == 2))
			    {
		            Kapu[KapuID[playerid]][kVan] = false;
		            Kapu[KapuID[playerid]][kSzerkeszt] = false;
					Kapu[KapuID[playerid]][kModel] = 0;
					Kapu[KapuID[playerid]][kTav] = 0.0;
					Kapu[KapuID[playerid]][kSpeed] = 0.0;
					Kapu[KapuID[playerid]][kPos][0] = 0.0;
					Kapu[KapuID[playerid]][kPos][1] = 0.0;
					Kapu[KapuID[playerid]][kPos][2] = 0.0;
					Kapu[KapuID[playerid]][kNPos][0] = 0.0;
					Kapu[KapuID[playerid]][kNPos][1] = 0.0;
					Kapu[KapuID[playerid]][kNPos][2] = 0.0;
					Kapu[KapuID[playerid]][kNRPos][0] = 0.0;
					Kapu[KapuID[playerid]][kNRPos][1] = 0.0;
					Kapu[KapuID[playerid]][kNRPos][2] = 0.0;
					Kapu[KapuID[playerid]][kZPos][0] = 0.0;
					Kapu[KapuID[playerid]][kZPos][1] = 0.0;
					Kapu[KapuID[playerid]][kZPos][2] = 0.0;
					Kapu[KapuID[playerid]][kZRPos][0] = 0.0;
					Kapu[KapuID[playerid]][kZRPos][1] = 0.0;
					Kapu[KapuID[playerid]][kZRPos][2] = 0.0;
					Kapu[KapuID[playerid]][kMozgo] = false;
					Kapu[KapuID[playerid]][kNyit] = false;
					Kapu[KapuID[playerid]][kVW] = NINCS;
					DestroyDynamicObject(Kapu[KapuID[playerid]][kOID]);
					SzerkesztesAllas[playerid] = 0;
					KapuID[playerid] = NINCS;
					SCM(playerid, COL_MKEK, "Kilйptйl a szerkesztйsi folyamatbуl, kapu sikeresen tцrцlve!");
			        return true;
				}
				if(SzerkesztesAllas[playerid] == 4)
				{
			        SetDynamicObjectPos(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZPos]));
					SetDynamicObjectRot(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZRPos]));
	                Kapu[KapuID[playerid]][kSzerkeszt] = false;
					SzerkesztesAllas[playerid] = 0;
					KapuID[playerid] = NINCS;
					SCM(playerid, COL_MKEK, "Kapu szerkesztйse befejezve йs visszaбllнtva az eredeti zбrt бllapotбra!");
			        return false;
				}
			}

			if(AutomataID[playerid] > -1)
			{
				new
					Float:objectpos[6],
					automataid = AutomataID[playerid];

				GetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
				GetDynamicObjectRot(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);

				SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
				SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);

				AutomataID[playerid] = NINCS;
				return true;
			}

			new butorszam = ButorObjectID(objectid);
			if(ButorInfo[butorszam][butorMegveve])
			{
				SetDynamicObjectPos(ButorInfo[butorszam][butorObject], ButorInfo[butorszam][butorPosX], ButorInfo[butorszam][butorPosY], ButorInfo[butorszam][butorPosZ]);
				SetDynamicObjectRot(ButorInfo[butorszam][butorObject], ButorInfo[butorszam][butorPosRX], ButorInfo[butorszam][butorPosRY], ButorInfo[butorszam][butorPosRZ]);
			} else {
				ButorInfo[butorszam][butorPosX] = 0.0;
				ButorInfo[butorszam][butorPosY] = 0.0;
				ButorInfo[butorszam][butorPosZ] = 0.0;
				ButorInfo[butorszam][butorPosRX] = 0.0;
				ButorInfo[butorszam][butorPosRY] = 0.0;
				ButorInfo[butorszam][butorPosRZ] = 0.0;
				ButorInfo[butorszam][butorVW] = 0;
				ButorInfo[butorszam][butorInterior] = 0;
				ButorInfo[butorszam][butorHasznalva] = false;
				ButorInfo[butorszam][butorMegveve] = false;
				ButorInfo[butorszam][butorTipus] = NINCS;
				ButorInfo[butorszam][butorListitem] = NINCS;
				ButorInfo[butorszam][butorModel] = 0;
				ButorInfo[butorszam][butorPosRX] = 0.0;
				ButorInfo[butorszam][butorPosRY] = 0.0;
				ButorInfo[butorszam][butorPosRZ] = 0.0;
				DestroyDynamicObject(ButorInfo[butorszam][butorObject]);
			}
			/*new
				Float:objectpos[6],
				automataid = ObjectID(objectid);

			GetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
			GetDynamicObjectRot(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);

			SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
			SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);*/
		}
	}
	if(response == EDIT_RESPONSE_FINAL || response == EDIT_RESPONSE_CANCEL)
	{
	    g_ObjectetEditel[playerid] = NINCS;
	}
	MoveDynamicObject(objectid, fX, fY, fZ, 20.0, fRotX, fRotY, fRotZ);
	return true;
}
Код:
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15702) : error 017: undefined symbol "fX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15703) : error 017: undefined symbol "fY"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15704) : error 017: undefined symbol "fZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15705) : error 017: undefined symbol "fRotZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15709) : error 017: undefined symbol "fRotX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15738) : error 017: undefined symbol "fX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15739) : error 017: undefined symbol "fY"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15740) : error 017: undefined symbol "fZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15741) : error 017: undefined symbol "fRotZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15745) : error 017: undefined symbol "fRotX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15773) : error 017: undefined symbol "fX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15774) : error 017: undefined symbol "fY"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15775) : error 017: undefined symbol "fZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15777) : error 017: undefined symbol "fRotX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15778) : error 017: undefined symbol "fRotY"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15779) : error 017: undefined symbol "fRotZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15788) : error 017: undefined symbol "fX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15798) : error 017: undefined symbol "fX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15805) : error 017: undefined symbol "fX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15806) : error 017: undefined symbol "fY"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15807) : error 017: undefined symbol "fZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15808) : error 017: undefined symbol "fRotX"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15809) : error 017: undefined symbol "fRotY"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15810) : error 017: undefined symbol "fRotZ"
C:\Users\Lenovo\Downloads\RasheedSeeMod (2)\gamemodes\BACKUP\seerpg_ls.pwn(15818) : error 017: undefined symbol "fX"



Re: OnPlayerEditDynamicObject error (26) - RogueDrifter - 11.12.2017

EDIT:REMOVED
but LOL the most straightforward post ever hands down (y)
EDIT: you can also take that whole function out in a new pawno and do CTRL+H and replace every fX to x and fY to y and fZ to z and fRotX to rx and fRotY to ry and fRotZ to rz.


Re: OnPlayerEditDynamicObject error (26) - Xeon™ - 11.12.2017

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
idk what's that you basically just didn't declare those variables? basically adding this at the top of the function should prevent that error
PHP код:
new Float:fX,Float:fY,Float:fZ,Float:fRotX,Float:fRotY,Float:fRotZ
but LOL the most straightforward post ever hands down (y)
Wait no! FOR ONCE try to read the code.

you have to change this
PHP код:
public OnPlayerEditDynamicObject(playeridobjectidresponseFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz
to
PHP код:
public OnPlayerEditDynamicObject(playeridobjectidresponseFloat:fXFloat:fYFloat:fZFloat:fRotXFloat:fRotYFloat:fRotZ
IF you didn't follow my code/post your code won't work in run time.


Re: OnPlayerEditDynamicObject error (26) - RogueDrifter - 11.12.2017

Quote:
Originally Posted by Xeon™
Посмотреть сообщение
Wait no! FOR ONCE try to read the code.

you have to change this
PHP код:
public OnPlayerEditDynamicObject(playeridobjectidresponseFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz
to
PHP код:
public OnPlayerEditDynamicObject(playeridobjectidresponseFloat:fXFloat:fYFloat:fZFloat:fRotXFloat:fRotYFloat:fRotZ
IF you didn't follow my code/post your code won't work in run time.
Bruh do you even streamer? lol
PHP код:
6\gamemodes\gamemode.pwn(1959) : error 025: function heading differs from prototype 
if he compiles what you just gave him that's what he'll get.


Re: OnPlayerEditDynamicObject error (26) - Xeon™ - 11.12.2017

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
Bruh do you streamer? lol
PHP код:
6\gamemodes\gamemode.pwn(1959) : error 025: function heading differs from prototype 
if he compiles what you just gave him that's what he'll get.
then he should edit fX to x and go on. because of fX where used in this callback. declaring them will give him and null variable for every f* and *Rot so he should edit his callback, and you can be nice and do it for him.

P.S: i think he is trying to convert normal one to streamer.


Re: OnPlayerEditDynamicObject error (26) - RogueDrifter - 11.12.2017

i edited my comment and i actually dont mind, here OP copy this code:
PHP код:
public OnPlayerEditDynamicObject(playeridobjectidresponseFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz)
{
    if(
g_ObjectetEditel[playerid] != objectid)
    {
        
g_ObjectetEditel[playerid] = NINCS;
        return 
false;
    }
    if(
GetPVarInt(playerid"vObjEdit") == VOBJ_EDIT_RENDORVILLOGO)
    {
        if(
response == EDIT_RESPONSE_FINAL)
        {
            new 
kocsi GetPlayerVehicleID(playerid),
                
jarmuidje JarmuID(kocsiplayerid);
            new 
Float:ofxFloat:ofyFloat:ofzFloat:ofaz;
            new 
Float:finalxFloat:finaly;
            new 
Float:pxFloat:pyFloat:pzFloat:roz;
            
GetVehiclePos(vInfo[jarmuidje][vID], pxpypz);
            
GetVehicleZAngle(vInfo[jarmuidje][vID], roz);
            
ofx x-px;
            
ofy y-py;
            
ofz z-pz;
            
ofaz rz-roz;
            
finalx ofx*floatcos(rozdegrees)+ofy*floatsin(rozdegrees);
            
finaly = -ofx*floatsin(rozdegrees)+ofy*floatcos(rozdegrees);
            
AttachDynamicObjectToVehicle(vInfo[jarmuidje][vVillogo], vInfo[jarmuidje][vID], finalxfinalyofzrxryofaz);
            
SetPVarInt(playerid"vObjEdit"0);
            
UnFreeze(playerid);
            return 
1;
        }
        else if(
response == EDIT_RESPONSE_CANCEL)
        {
            new 
kocsi GetPlayerVehicleID(playerid),
                
jarmuidje JarmuID(kocsiplayerid);
            
DestroyDynamicObject(vInfo[jarmuidje][vVillogo]);
            
SetPVarInt(playerid"vObjEdit"0);
            
UnFreeze(playerid);
            return 
1;
        }
    }
    else if(
GetPVarInt(playerid"vObjEdit") == VOBJ_EDIT_TAXI)
    {
        if(
response == EDIT_RESPONSE_FINAL)
        {
            new 
kocsi GetPlayerVehicleID(playerid),
                
jarmuidje JarmuID(kocsiplayerid);
            new 
Float:ofxFloat:ofyFloat:ofzFloat:ofaz;
            new 
Float:finalxFloat:finaly;
            new 
Float:pxFloat:pyFloat:pzFloat:roz;
            
GetVehiclePos(vInfo[jarmuidje][vID], pxpypz);
            
GetVehicleZAngle(vInfo[jarmuidje][vID], roz);
            
ofx x-px;
            
ofy y-py;
            
ofz z-pz;
            
ofaz rz-roz;
            
finalx ofx*floatcos(rozdegrees)+ofy*floatsin(rozdegrees);
            
finaly = -ofx*floatsin(rozdegrees)+ofy*floatcos(rozdegrees);
            
AttachDynamicObjectToVehicle(vInfo[jarmuidje][vTaxi], vInfo[jarmuidje][vID], finalxfinalyofzrxryofaz);
            
SetPVarInt(playerid"vObjEdit"0);
            
UnFreeze(playerid);
            return 
1;
        }
        else if(
response == EDIT_RESPONSE_CANCEL)
        {
            new 
kocsi GetPlayerVehicleID(playerid),
                
jarmuidje JarmuID(kocsiplayerid);
            
DestroyDynamicObject(vInfo[jarmuidje][vTaxi]);
            
SetPVarInt(playerid"vObjEdit"0);
            
UnFreeze(playerid);
            return 
1;
        }
    }
    else
    {
        if(
response == EDIT_RESPONSE_FINAL)
        {
            new 
fid FrakcioID(PlayerInfo[playerid][pFrakcioKezeles]);
            if(
fid != NINCS)
            {
                if(
FInfo[fid][fObjectID] == objectid)
                {
                    
PlayerInfo[playerid][pFrakcioKezeles] = -1;
                    
FInfo[fid][fSzefPos][0] = x;
                    
FInfo[fid][fSzefPos][1] = y;
                    
FInfo[fid][fSzefPos][2] = z;
                    
FInfo[fid][fSzefPosR][0] = rx;
                    
FInfo[fid][fSzefPosR][1] = ry;
                    
FInfo[fid][fSzefPosR][2] = rz;
                    
FkUpdate(fidfuSzefObject);
                    
SFM(playeridCOL_MKEK"%s frakciу szйf pozнciуja sikeresen elmentve!"FInfo[fid][fNev]);
                    return 
true;
                }
            }
            if(
objectid == GraffitiObjectLerakas[playerid])
            {
                
AddTag(x,y,z,rx,ry,rz);
                
DestroyDynamicObject(GraffitiObjectLerakas[playerid]);
                
GraffitiObjectLerakas[playerid] = 0;
                
SCM(playerid,COL_LRED"Grafiti Lerakva!");
                return 
1;
            }
            if(
objectid == HifiObjectLerakas[playerid])
            {
                
DestroyDynamicObject(HifiObjectLerakas[playerid]);
                
HifiObjectLerakas[playerid] = 0;
                
HifiLerak(playerid,x,y,z,rx,ry,rz);
                return 
true;
            }
            if(
AutomataID[playerid] > NINCS)
            {
                new 
auid AutomataID[playerid];
                
AutomataInfo[auid][aupos][0] = x;
                
AutomataInfo[auid][aupos][1] = y;
                
AutomataInfo[auid][aupos][2] = z;
                
AutomataInfo[auid][aupos][3] = rx;
                
AutomataInfo[auid][aupos][4] = ry;
                
AutomataInfo[auid][aupos][5] = rz;
                
//if(AutomataInfo[auid][autipus] == 2)
                //{
                //    if(IsValidDynamic3DTextLabel(AutomataInfo[auid][autext])) DestroyDynamic3DTextLabel(AutomataInfo[auid][autext]);
                //    AutomataInfo[auid][autext] = CreateDynamic3DTextLabel("(( /menь ))", COLOR_MKEK, x, y, z, 40.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0);
                //}
                
SetDynamicObjectPos(AutomataInfo[auid][auobject], xyz);
                
SetDynamicObjectRot(AutomataInfo[auid][auobject], rxryrz);
                
//DestroyDynamicObject(AutomataInfo[auid][auobject]);
                //AutomataInfo[auid][auobject] = CreateDynamicObject(AutomataModel(AutomataInfo[auid][autipus]), x, y, z, rx, ry, rz, AutomataInfo[auid][auVW], AutomataInfo[auid][auInt]);
                
Streamer_Update(playerid);
                
AutomataInfo[auid][auszerkeszti] = false;
                
AutomataInfo[auid][auhasznalva] = true;
                
SCM(playeridCOL_VZOLD"Automata pozнciуja sikeresen elmentve!");
                
AutomataID[playerid] = NINCS;
                new 
qry[1024];
                
format(qry1024"UPDATE `"#LSQL_AUTOMATA_TABLA"` SET aupenz='%d', auposx='%f', auposy='%f', auposz='%f', aurotx='%f', auroty='%f', aurotz='%f', vw='%d', int='%d' WHERE id='%d'", AutomataInfo[auid][aupenz], x, y, z, rx, ry, rz, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid), auid);
                
new DB:db db_open(LSQL_ADATBAZIS);
                
db_free_result(db_query(dbqry));
                
db_close(db);
                return 
true;
            }
            if(
KapuID[playerid] != NINCS)
            {
                switch(
SzerkesztesAllas[playerid])
                {
                    case 
1:
                    {
                        
Kapu[KapuID[playerid]][kZPos][0] = x;
                        
Kapu[KapuID[playerid]][kZPos][1] = y;
                        
Kapu[KapuID[playerid]][kZPos][2] = z;
                        
Kapu[KapuID[playerid]][kZRPos][0] = rx;
                        
Kapu[KapuID[playerid]][kZRPos][1] = ry;
                        
Kapu[KapuID[playerid]][kZRPos][2] = rz;
                        
SzerkesztesAllas[playerid] = 2;
                        
EditDynamicObject(playeridKapu[KapuID[playerid]][kOID]);
                        
SCM(playeridCOL_MKEK"Zбrt pozнciу sikeresen elmentve!");
                        
SCM(playeridCOL_MKEK"Most kйrlek бllнtsd be йs mentsd el a kapu nyitott бllapotбt!");
                        return 
true;
                    }
                    case 
2:
                    {
                        
Kapu[KapuID[playerid]][kNPos][0] = x;
                        
Kapu[KapuID[playerid]][kNPos][1] = y;
                        
Kapu[KapuID[playerid]][kNPos][2] = z;
                        
Kapu[KapuID[playerid]][kNRPos][0] = rx;
                        
Kapu[KapuID[playerid]][kNRPos][1] = ry;
                        
Kapu[KapuID[playerid]][kNRPos][2] = rz;
                        
Kapu[KapuID[playerid]][kMozgo] = true;
                        
Kapu[KapuID[playerid]][kSzerkeszt] = false;
                        new 
querycske[2048], hasznalocska[128], NINCSnumero GetHasznaloNum(KapuID[playerid]);
                        for(;++
MAX_KAPU_HASZNALO;)
                        {
                            if(
Kapu[KapuID[playerid]][kHasznalo][i] > 0)
                            {
                                
format(hasznalocskasizeof(hasznalocska), "%s%d%s"hasznalocskaKapu[KapuID[playerid]][kHasznalo][i], (numero ? (",") : ("")));
                            }
                        }
                        
format(querycskesizeof(querycske), "INSERT INTO `"#MYSQL_KAPU_TABLA"` (ID, Nev, Model, Tav, Speed, Pos, NPos, NRPos, ZPos, ZRPos, Hasznalo, nyit, Vw, Kod)");
                        
format(querycskesizeof(querycske), "%s VALUES('%d',"querycskeKapuID[playerid]);
                        
format(querycskesizeof(querycske), "%s'%s','%d',"querycskeKapu[KapuID[playerid]][kNev], Kapu[KapuID[playerid]][kModel]);
                        
format(querycskesizeof(querycske), "%s'%f','3',"querycskeKapu[KapuID[playerid]][kTav]);
                        
format(querycskesizeof(querycske), "%s'%f,%f,%f',"querycskePosExt(Kapu[KapuID[playerid]][kZPos]));
                        
format(querycskesizeof(querycske), "%s'%f,%f,%f',"querycskePosExt(Kapu[KapuID[playerid]][kNPos]));
                        
format(querycskesizeof(querycske), "%s'%f,%f,%f',"querycskePosExt(Kapu[KapuID[playerid]][kNRPos]));
                        
format(querycskesizeof(querycske), "%s'%f,%f,%f',"querycskePosExt(Kapu[KapuID[playerid]][kZPos]));
                        
format(querycskesizeof(querycske), "%s'%f,%f,%f',"querycskePosExt(Kapu[KapuID[playerid]][kZRPos]));
                        
format(querycskesizeof(querycske), "%s'%s','0','%d',"querycske, (strlen(hasznalocska) > hasznalocska : ("0")), GetPlayerVirtualWorld(playerid));
                        
format(querycskesizeof(querycske), "%s'%d')"querycskeKapu[KapuID[playerid]][kKod]);
                        
//mysql_function_query(sql_ID, querycske, false, "", "");
                        
mysql_tquery(sql_IDquerycske"""");
                        if(
Kapu[KapuID[playerid]][kKod] > NINCS)
                            
AdminUzenet(COLOR_LIGHTRED1"%s lйtrehozott egy kaput! Obj: %d | Kуd: %d | Folyamat: EDO"JatekosNev(playerid), Kapu[KapuID[playerid]][kModel], Kapu[KapuID[playerid]][kKod]);
                        else
                            
AdminUzenet(COLOR_LIGHTRED1"%s lйtrehozott egy kaput! Obj: %d | Fk: %s | Folyamat: EDO"JatekosNev(playerid), Kapu[KapuID[playerid]][kModel], hasznalocska);
                        
SCM(playeridCOL_MKEK"Kapu zбrt йs nyitott бllapota sikeresen elmentve!");
                        
SetDynamicObjectPos(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZPos]));
                        
SetDynamicObjectRot(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZRPos]));
                        
SzerkesztesAllas[playerid] = NINCS;
                        
KapuID[playerid] = NINCS;
                        return 
true;
                    }
                    case 
3:
                    {
                        
Kapu[KapuID[playerid]][kZPos][0] = x;
                        
Kapu[KapuID[playerid]][kZPos][1] = y;
                        
Kapu[KapuID[playerid]][kZPos][2] = z;
                        
Kapu[KapuID[playerid]][kZRPos][0] = rx;
                        
Kapu[KapuID[playerid]][kZRPos][1] = ry;
                        
Kapu[KapuID[playerid]][kZRPos][2] = rz;
                        
Kapu[KapuID[playerid]][kSzerkeszt] = false;
                        new 
querycske[256];
                        
format(querycskesizeof(querycske), "UPDATE `"#MYSQL_KAPU_TABLA"` SET ZPos = '%f,%f,%f', ZRPos = '%f,%f,%f' WHERE ID = '%d'", PosExt(Kapu[KapuID[playerid]][kZPos]), PosExt(Kapu[KapuID[playerid]][kZRPos]), KapuID[playerid]);
                        //mysql_function_query(sql_ID, querycske, false, "", "");
                        
mysql_tquery(sql_IDquerycske"""");
                        
KapuID[playerid] = NINCS;
                        
SCM(playeridCOL_MKEK"Kapu zбrt бllapota sikeresen frissнtve!");
                        return 
true;
                    }
                    case 
4:
                    {
                        
Kapu[KapuID[playerid]][kNPos][0] = x;
                        
Kapu[KapuID[playerid]][kNPos][1] = y;
                        
Kapu[KapuID[playerid]][kNPos][2] = z;
                        
Kapu[KapuID[playerid]][kNRPos][0] = rx;
                        
Kapu[KapuID[playerid]][kNRPos][1] = ry;
                        
Kapu[KapuID[playerid]][kNRPos][2] = rz;
                        
Kapu[KapuID[playerid]][kSzerkeszt] = false;
                        new 
querycske[256];
                        
format(querycskesizeof(querycske), "UPDATE `"#MYSQL_KAPU_TABLA"` SET NPos = '%f,%f,%f', NRPos = '%f,%f,%f' WHERE ID = '%d'", PosExt(Kapu[KapuID[playerid]][kNPos]), PosExt(Kapu[KapuID[playerid]][kNRPos]), KapuID[playerid]);
                        //mysql_function_query(sql_ID, querycske, false, "", "");
                        
mysql_tquery(sql_IDquerycske"""");
                        
SetDynamicObjectPos(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZPos]));
                        
SetDynamicObjectRot(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZRPos]));
                        
KapuID[playerid] = NINCS;
                        
SCM(playeridCOL_MKEK"Kapu nyitott бllapota sikeresen frissнtve!");
                        return 
true;
                    }
                }
            }
            new 
querycske[1024],formatalunk[512],
            
kategoria[48],penz,nev[48],
            
butorszam ButorObjectID(objectid);
            if(!
ButorInfo[butorszam][butorMegveve])
            {
                switch(
ButorInfo[butorszam][butorTipus])
                {
                    case 
1:
                    {
                        
kategoria "Asztal";
                        
penz Butor_Asztal[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Asztal[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
2:
                    {
                        
kategoria "Ьlogarnitъra";
                        
penz Butor_Ulogarnitura[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Ulogarnitura[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
3:
                    {
                        
kategoria "Festmйnyek, kйpek";
                        
penz Butor_Kepek[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Kepek[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
4:
                    {
                        
kategoria "Lбmpбk";
                        
penz Butor_Lampak[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Lampak[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
5:
                    {
                        
kategoria "TV-k";
                        
penz Butor_TV[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_TV[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
6:
                    {
                        
kategoria "DVD-k, HiFi-k";
                        
penz Butor_DVDHiFi[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_DVDHiFi[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
7:
                    {
                        
kategoria "Hangfal";
                        
penz Butor_Hangfal[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Hangfal[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
8:
                    {
                        
kategoria "Szekrйny";
                        
penz Butor_Szekreny[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Szekreny[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
9:
                    {
                        
kategoria "Fotel";
                        
penz Butor_Fotel[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Fotel[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
10:
                    {
                        
kategoria "Konyhabъtor";
                        
penz Butor_Konyhabutor[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Konyhabutor[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
11:
                    {
                        
kategoria "Huto";
                        
penz Butor_Huto[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Huto[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
12:
                    {
                        
kategoria "Szбmнtуgйp";
                        
penz Butor_Szamitogep[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Szamitogep[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
13:
                    {
                        
kategoria "Ajtу";
                        
penz Butor_Ajto[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Ajto[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
14:
                    {
                        
kategoria "Mosуgйp";
                        
penz Butor_Mosogep[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Mosogep[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
15:
                    {
                        
kategoria "Nyomtatу";
                        
penz Butor_Nyomtato[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Nyomtato[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
16:
                    {
                        
kategoria "Бgy";
                        
penz Butor_Agy[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Agy[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
17:
                    {
                        
kategoria "WC";
                        
penz Butor_WC[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_WC[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
18:
                    {
                        
kategoria "Zuhanyzу";
                        
penz Butor_Zuhanyzo[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Zuhanyzo[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
19:
                    {
                        
kategoria "Mosdу";
                        
penz Butor_Mosdo[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Mosdo[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
20:
                    {
                        
kategoria "Szonyeg";
                        
penz Butor_Szonyeg[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Szonyeg[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
21:
                    {
                        
kategoria "Szйk";
                        
penz Butor_Szek[ButorInfo[butorszam][butorListitem]][butorNEV];
                        
format(nevsizeof(nev), Butor_Szek[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
22:
                    {
                        
kategoria "Нrуasztal";
                        
penz Butor_Iroasztal[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Iroasztal[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
23:
                    {
                        
kategoria "Fal";
                        
penz Butor_Fal[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Fal[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                    case 
24:
                    {
                        
kategoria "Szйf";
                        
penz Butor_Szef[ButorInfo[butorszam][butorListitem]][butorAR];
                        
format(nevsizeof(nev), Butor_Szef[ButorInfo[butorszam][butorListitem]][butorNEV]);
                    }
                }
                
ButorInfo[butorszam][butorPosX] = x;
                
ButorInfo[butorszam][butorPosY] = y;
                
ButorInfo[butorszam][butorPosZ] = z;
                
ButorInfo[butorszam][butorPosRX] = rx;
                
ButorInfo[butorszam][butorPosRY] = ry;
                
ButorInfo[butorszam][butorPosRZ] = rz;
                
PlayerInfo[playerid][pSzButor] = butorszam;
                
format(formatalunksizeof(formatalunk), #COL_FEHER"Biztos, hogy meg akarod venni a kцvetkezo bъtort?\n\n\n"#COL_VKEK"Bъtor kategуriбja: "#COL_FEHER"%s\n"#COL_VKEK"Bъtor neve: "#COL_FEHER"%s\n"#COL_VKEK"Bъtor бra: "#COL_FEHER"%d$", kategoria, nev, penz);
                
ShowPlayerDialog(playeridDIALOG_BUTOR_MEGVETELDIALOG_STYLE_MSGBOX#COL_FEHER"Bъtor "#COL_VKEK"megvйtele", formatalunk, "Biztos!", "Mйgse!");
                
return true;
            }
            
format(querycskesizeof(querycske), "UPDATE `butorok` SET butorPosX = '%.2f', butorPosY = '%.2f', butorPosZ = '%.2f', butorPosRX = '%.2f', butorPosRY = '%.2f', butorPosRZ = '%.2f' WHERE id = '%d'"xyzrxryrzbutorszam);
            
//mysql_function_query(sql_ID, querycske, false, "", "");
            
mysql_tquery(sql_IDquerycske"""");
            
SCM(playeridCOL_MKEK"Sikeresen elmentetted a bъtort!");
        }
        if(
response == EDIT_RESPONSE_CANCEL)
        {
            if(
objectid == HifiObjectLerakas[playerid])
            {
                
PlayerInfo[playerid][pCuccok][BL_HIFI]++;
                
DestroyDynamicObject(HifiObjectLerakas[playerid]);
                
SCM(playerid,COL_LRED,"Akkor mйgse rakj le..");
                return 
true;
            }
            if(
objectid == GraffitiObjectLerakas[playerid])
            {
                
DestroyDynamicObject(GraffitiObjectLerakas[playerid]);
                
GraffitiObjectLerakas[playerid] = 0;
                
SCM(playerid,COL_LRED"Grafiti lerakбsi kнsйrlet tцrцlve!");
                return 
1;
            }
            if(
KapuID[playerid] != NINCS)
            {
                if((
SzerkesztesAllas[playerid] == || SzerkesztesAllas[playerid] == 2))
                {
                    
Kapu[KapuID[playerid]][kVan] = false;
                    
Kapu[KapuID[playerid]][kSzerkeszt] = false;
                    
Kapu[KapuID[playerid]][kModel] = 0;
                    
Kapu[KapuID[playerid]][kTav] = 0.0;
                    
Kapu[KapuID[playerid]][kSpeed] = 0.0;
                    
Kapu[KapuID[playerid]][kPos][0] = 0.0;
                    
Kapu[KapuID[playerid]][kPos][1] = 0.0;
                    
Kapu[KapuID[playerid]][kPos][2] = 0.0;
                    
Kapu[KapuID[playerid]][kNPos][0] = 0.0;
                    
Kapu[KapuID[playerid]][kNPos][1] = 0.0;
                    
Kapu[KapuID[playerid]][kNPos][2] = 0.0;
                    
Kapu[KapuID[playerid]][kNRPos][0] = 0.0;
                    
Kapu[KapuID[playerid]][kNRPos][1] = 0.0;
                    
Kapu[KapuID[playerid]][kNRPos][2] = 0.0;
                    
Kapu[KapuID[playerid]][kZPos][0] = 0.0;
                    
Kapu[KapuID[playerid]][kZPos][1] = 0.0;
                    
Kapu[KapuID[playerid]][kZPos][2] = 0.0;
                    
Kapu[KapuID[playerid]][kZRPos][0] = 0.0;
                    
Kapu[KapuID[playerid]][kZRPos][1] = 0.0;
                    
Kapu[KapuID[playerid]][kZRPos][2] = 0.0;
                    
Kapu[KapuID[playerid]][kMozgo] = false;
                    
Kapu[KapuID[playerid]][kNyit] = false;
                    
Kapu[KapuID[playerid]][kVW] = NINCS;
                    
DestroyDynamicObject(Kapu[KapuID[playerid]][kOID]);
                    
SzerkesztesAllas[playerid] = 0;
                    
KapuID[playerid] = NINCS;
                    
SCM(playeridCOL_MKEK"Kilйptйl a szerkesztйsi folyamatbуl, kapu sikeresen tцrцlve!");
                    return 
true;
                }
                if(
SzerkesztesAllas[playerid] == 4)
                {
                    
SetDynamicObjectPos(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZPos]));
                    
SetDynamicObjectRot(Kapu[KapuID[playerid]][kOID], PosExt(Kapu[KapuID[playerid]][kZRPos]));
                    
Kapu[KapuID[playerid]][kSzerkeszt] = false;
                    
SzerkesztesAllas[playerid] = 0;
                    
KapuID[playerid] = NINCS;
                    
SCM(playeridCOL_MKEK"Kapu szerkesztйse befejezve йs visszaбllнtva az eredeti zбrt бllapotбra!");
                    return 
false;
                }
            }
            if(
AutomataID[playerid] > -1)
            {
                new
                    
Float:objectpos[6],
                    
automataid AutomataID[playerid];
                
GetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
                
GetDynamicObjectRot(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);
                
SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
                
SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);
                
AutomataID[playerid] = NINCS;
                return 
true;
            }
            new 
butorszam ButorObjectID(objectid);
            if(
ButorInfo[butorszam][butorMegveve])
            {
                
SetDynamicObjectPos(ButorInfo[butorszam][butorObject], ButorInfo[butorszam][butorPosX], ButorInfo[butorszam][butorPosY], ButorInfo[butorszam][butorPosZ]);
                
SetDynamicObjectRot(ButorInfo[butorszam][butorObject], ButorInfo[butorszam][butorPosRX], ButorInfo[butorszam][butorPosRY], ButorInfo[butorszam][butorPosRZ]);
            } else {
                
ButorInfo[butorszam][butorPosX] = 0.0;
                
ButorInfo[butorszam][butorPosY] = 0.0;
                
ButorInfo[butorszam][butorPosZ] = 0.0;
                
ButorInfo[butorszam][butorPosRX] = 0.0;
                
ButorInfo[butorszam][butorPosRY] = 0.0;
                
ButorInfo[butorszam][butorPosRZ] = 0.0;
                
ButorInfo[butorszam][butorVW] = 0;
                
ButorInfo[butorszam][butorInterior] = 0;
                
ButorInfo[butorszam][butorHasznalva] = false;
                
ButorInfo[butorszam][butorMegveve] = false;
                
ButorInfo[butorszam][butorTipus] = NINCS;
                
ButorInfo[butorszam][butorListitem] = NINCS;
                
ButorInfo[butorszam][butorModel] = 0;
                
ButorInfo[butorszam][butorPosRX] = 0.0;
                
ButorInfo[butorszam][butorPosRY] = 0.0;
                
ButorInfo[butorszam][butorPosRZ] = 0.0;
                
DestroyDynamicObject(ButorInfo[butorszam][butorObject]);
            }
            
/*new
                Float:objectpos[6],
                automataid = ObjectID(objectid);
            GetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
            GetDynamicObjectRot(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);
            SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[0], objectpos[1], objectpos[2]);
            SetDynamicObjectPos(AutomataInfo[automataid][auobject], objectpos[3], objectpos[4], objectpos[5]);*/
        
}
    }
    if(
response == EDIT_RESPONSE_FINAL || response == EDIT_RESPONSE_CANCEL)
    {
        
g_ObjectetEditel[playerid] = NINCS;
    }
    
MoveDynamicObject(objectidxyz20.0rxryrz);
    return 
true;

all i did was ctrl+h and replaced all of the frotx froty frotx fx fy fz to their original values given by the public function in case if you wanna know how that code was made and the reason was already stated by that guy called xeon
EDIT: Please next time you post something make sure you notify the helper if the code worked or not, thanks.