Код:
CMD:hdelete(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 4)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Ban khong duoc phep su dung lenh nay.");
return 1;
}
new h, string[128];
if(sscanf(params,"d",h)) return SendClientMessage(playerid, COLOR_WHITE,"USAGE: /hdelete [HouseID]");
if(!IsValidDynamicPickup(HouseInfo[h][hPickupID])) return SendClientMessage(playerid, COLOR_WHITE,"Khong co can nha do de xoa.");
HouseInfo[h][hLevel] = 0;
HouseInfo[h][hIntIW] = 0;
HouseInfo[h][hCustomInterior] = 0;
HouseInfo[h][hDescription] = 0;
format(HouseInfo[h][hOwnerName],MAX_PLAYER_NAME, "Nobody");
HouseInfo[h][hExteriorX] = 0;
HouseInfo[h][hExteriorY] = 0;
HouseInfo[h][hExteriorZ] = 0;
HouseInfo[h][hExteriorR] = 0;
HouseInfo[h][hExteriorA] = 0;
HouseInfo[h][hInteriorX] = 0;
HouseInfo[h][hInteriorY] = 0;
HouseInfo[h][hInteriorZ] = 0;
HouseInfo[h][hInteriorR] = 0;
HouseInfo[h][hInteriorA] = 0;
HouseInfo[h][hLock] = 0;
HouseInfo[h][hRentable] = 0;
HouseInfo[h][hRentFee] = 0;
HouseInfo[h][hValue] = 0;
ClearHouse(h);
DestroyDynamicPickup(HouseInfo[h][hPickupID]);
DestroyDynamic3DTextLabel(HouseInfo[h][hTextID]);
HouseInfo[h][hCustomExterior] = 0;
SaveHouses();
format(string, sizeof(string), "Ban da xoa can nha ID %d.", h);
SendClientMessageEx(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "%s de xoa can nha ID %d.", GetPlayerNameEx(playerid), h);
Log("logs/hedit.log", string);
return 1;
}
can some one change this cmd to delete all house at one time, i have 5000 house so if use this cmd it's wast time