04-13-2014, 12:39 AM
(04-13-2014, 12:28 AM)daniel0916 Wrote: So i should test every position where a bookshelf should be and not use cBlockArea?
I will try to make it...
You have to check inside the loop if the "selected" block can be a bookshelf
cBlockArea Area; Area.Read(a_Player.GetWorld(), PosX - 2, PosX + 2, PosY, PosY + 1, PosZ - 2, PosZ + 2); for (int x = 0; x < 6; x++) { for (int y = 0; y < 3; y++) { for (int z = 0; z < 6; z++) { if((((x == 0) || (x == 5)) || ((z == 0) || (z == 5))) && ((y == 0) || y == 1)) { LOG("%i", Area.GetRelBlockType(x, y, z)); if (Area.GetRelBlockType(x, y, z) == E_BLOCK_BOOKCASE) { LOG("BookShelf"); } } } } }