11.07.2015, 03:59
I made the code:
When i run this command, the houses isn't delete. Then, the Console print this Message:
So, what was wrong with that loop ? How to fix ?
Код:
CMD:deleteallhouseex(playerid, params[]) { for(new i = 0; i < 5001; i++) { HouseInfo[i][hLevel] = 0; HouseInfo[i][hCustomInterior] = 0; HouseInfo[i][hDescription] = 0; format(HouseInfo[i][hOwnerName],MAX_PLAYER_NAME, "Nobody"); HouseInfo[i][hExteriorX] = 0; HouseInfo[i][hExteriorY] = 0; HouseInfo[i][hExteriorZ] = 0; HouseInfo[i][hExteriorR] = 0; HouseInfo[i][hExteriorA] = 0; HouseInfo[i][hLock] = 0; HouseInfo[i][hRentable] = 0; HouseInfo[i][hRentFee] = 0; HouseInfo[i][hValue] = 0; ClearHouse(i); DestroyDynamicPickup(HouseInfo[i][hPickupID]); DestroyDynamic3DTextLabel(HouseInfo[i][hTextID]); HouseInfo[i][hCustomExterior] = 0; SaveHouses(); } SendClientMessage(playerid, COLOR_YELLOW, "All house deleted."); return 1; }
Код:
Saving House ID 0 Saving House ID 1 ... Saving House ID 4999 Saving House ID 0 Saving House ID 1 ...