Selling all houses
#3

Quote:
Originally Posted by nemesis-
Посмотреть сообщение
Your for loop inside the if() is missing brackets encasing the functions. You also won't need the return 1; since you have one at the end of the function.
this.
pawn Код:
CMD:sellallhouses(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 99999)
    {
        for (new HouseID = 0; HouseID < MAX_HOUSES; HouseID++)
        {
        ClearHouse(HouseID);
        HouseInfo[HouseID][hGLUpgrade] = 1;
        }
        return 1;
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "You are not authorized to use that command!");
    }
    return 1;
}
also I think that you need to check if the houseID is an invalid ID or not, it's better than doing that even for unsued House slots.
Reply


Messages In This Thread
Selling all houses - by Mriss - 18.10.2014, 05:28
Re: Selling all houses - by nemesis- - 18.10.2014, 05:34
Re: Selling all houses - by Eth - 18.10.2014, 06:34

Forum Jump:


Users browsing this thread: 1 Guest(s)