23.09.2016, 18:54
hey guys i have createhouse sistem and i have a command that remove last house
i know what line should i delete so i can delete what house i want but i have a question , if i delete what house i want from DataBase with this command or manualy from DataBase > houses like house 10 and i have 20 houses
it will show like 1,2,3,4,5,6,7,8,9,11,12,etc... without 10 , it will be a problem ? just respond with 'Yes or No' , thx
Код HTML:
CMD:removehouse(playerid, params[])
{
new house;
if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
if(PlayerInfo[playerid][pAdmin] < 6) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai gradul necesar ca sa folosesti aceasta comanda!");
if(PlayerInfo[playerid][pGamingPerk] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Nu ai acces la aceasta comanda!");
if(sscanf(params,"i",house)) return SendClientMessage(playerid, COLOR_SYN, "Sintaxa:{FFFFFF} /removehouse <houseid>");
{
if(house != Total_House_Created) return SendClientMessage(playerid, COLOR_ERROR, "You can remove only last house.");
gQuery[0] = (EOS);
mysql_format(handle, gQuery, sizeof(gQuery),"DELETE FROM `houses` WHERE `ID` = %d", house);
mysql_tquery(handle, gQuery, "", "");
DestroyDynamicPickup(HouseInfo[house][hPickup]);
DestroyDynamic3DTextLabel(HouseInfo[house][hTextInfo]);
DestroyDynamicMapIcon(HouseInfo[house][hMapIcon]);
HouseInfo[house][hEntranceX] = 0;
HouseInfo[house][hEntranceY] = 0;
HouseInfo[house][hEntranceZ] = 0;
HouseInfo[house][hExitX] = 0;
HouseInfo[house][hExitY] = 0;
HouseInfo[house][hExitZ] = 0;
strmid(HouseInfo[house][hOwner], " ", 0, MAX_PLAYER_NAME, MAX_PLAYER_NAME);
HouseInfo[house][hValue] = 0;
HouseInfo[house][hInt] = 0;
HouseInfo[house][hLock] = 0;
HouseInfo[house][hOwned] = 0;
HouseInfo[house][hRent] = 0;
HouseInfo[house][hRentable] = 0;
HouseInfo[house][hSafe] = 0;
HouseInfo[house][hLevel] = 0;
HouseInfo[house][hWorld] = 0;
HouseInfo[house][hFurniture] = 0;
RadioH[house] = 0;
Total_House_Created --;
}
return 1;
}
it will show like 1,2,3,4,5,6,7,8,9,11,12,etc... without 10 , it will be a problem ? just respond with 'Yes or No' , thx