11.12.2017, 19:50
(
Последний раз редактировалось RogueDrifter; 12.12.2017 в 08:34.
)
i edited my comment and i actually dont mind, here OP copy this code:
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.
PHP код:
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 = x-px;
ofy = y-py;
ofz = z-pz;
ofaz = rz-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, rx, ry, 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 = x-px;
ofy = y-py;
ofz = z-pz;
ofaz = rz-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, rx, ry, 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] = 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(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(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], x, y, z);
SetDynamicObjectRot(AutomataInfo[auid][auobject], rx, ry, rz);
//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(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], x, y, z, rx, ry, rz, 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] = 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(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] = 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], 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] = 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(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] = 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(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 = "Ьlogarnitъ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 = "Huto";
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 = "Szonyeg";
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] = 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(formatalunk, sizeof(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(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'", x, y, z, rx, ry, rz, 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, x, y, z, 20.0, rx, ry, rz);
return true;
}
EDIT: Please next time you post something make sure you notify the helper if the code worked or not, thanks.