Szerző Téma: Rossz Z tengely (vagy mi)  (Megtekintve 465 alkalommal)

Nem elérhető Live

  • 507
    • Profil megtekintése
Rossz Z tengely (vagy mi)
« Dátum: 2013. november 01. - 12:09:26 »
0 Show voters
Helló..
Mikor elmentem a bútort akkor jó és a helyes pozícióban marad.
De mikor újratöltöm az fs-t akkor a Z tengely lentebb kerül és persze így a bútor a földben lesz benne.
 

public OnPlayerEditDynamicObject(playerid, objectid, response, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz) {
new Float:oldX, Float:oldY, Float:oldZ,Float:oldRotX, Float:oldRotY, Float:oldRotZ;
GetDynamicObjectPos(objectid, oldX, oldY, oldZ);
GetDynamicObjectRot(objectid, oldRotX, oldRotY, oldRotZ);
if(response == EDIT_RESPONSE_FINAL) {
new key[24];
for(new id = 0; id < MAX_HOUSES; id ++) {
   for(new i = 0; i < MAX_FURNITURES; i ++) {
      if(objectid == Property[id][FurnitureObject]) {
          SetDynamicObjectPos(Property[id][FurnitureObject], x, y, z);
             SetDynamicObjectRot(Property[id][FurnitureObject], rx, ry, rz);
          format(File, sizeof(File), \"HouseSystem/%i.ini\", id);
         Property[id][FurniturePosX] = x;
         Property[id][FurniturePosY] = y;
         Property[id][FurniturePosZ] = z;
         Property[id][FurnitureRotX] = rx;
         Property[id][FurnitureRotY] = ry;
         Property[id][FurnitureRotZ] = rz;
         format(key, 24, \"FurnitureModel%d\", i);
         dini_IntSet(File, key, Property[id][FurnitureObject]);
         format(key, 24, \"FurniturePosX%d\", i);
         dini_FloatSet(File, key, Property[id][FurniturePosX]);
         format(key, 24, \"FurniturePosY%d\", i);
         dini_FloatSet(File, key, Property[id][FurniturePosY]);
         format(key, 24, \"FurniturePosZ%d\", i);
         dini_FloatSet(File, key, Property[id][FurniturePosZ]);
         format(key, 24, \"FurnitureRotX%d\", i);
         dini_FloatSet(File, key, Property[id][FurnitureRotX]);
         format(key, 24, \"FurnitureRotY%d\", i);
         dini_FloatSet(File, key, Property[id][FurnitureRotY]);
         format(key, 24, \"FurnitureRotZ%d\", i);
         dini_FloatSet(File, key, Property[id][FurnitureRotZ]);
         MsgBox(playerid, \"{FFFF99}Bútor sikeresen mentve!\");
         break;
      }
   }
}
}
if(response == EDIT_RESPONSE_CANCEL) {
    for(new id = 0; id < MAX_HOUSES; id ++) {
   for(new i = 0; i < MAX_FURNITURES; i ++) {
       if(objectid == Property[id][FurnitureObject]) {
               SetDynamicObjectPos(Property[id][FurnitureObject], oldX, oldY, oldZ);
             SetDynamicObjectRot(Property[id][FurnitureObject], oldRotX, oldRotY, oldRotZ);
          }
        }
}
}
return 1;
}

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal