Loading business pickups.
#4

Dunno, try adding a variable to check if the business is owned or not, like:

pawn Код:
if(Business[i][bOwned] == 1)
                {
                    //blablabla
                }
                else if(Business[i][bOwned] == 0)
                {
                    //blablabla
                }
and if it works, it's something wrong with strmatch, however your code seems good, I can't find anything wrong with it.

Edit: The checkpoint thing is weird.

Edit again:

pawn Код:
command(createbusiness,playerid, params[])
{
    if(GetPlayerAdmin(playerid) < 5) return 0;
    {
        new level;
        if(sscanf(params, "i", level)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /createbusiness Level(1-7)");
        else
        {
            new string[200], Float:POS[3];
            GetPlayerPos(playerid, POS[0], POS[1], POS[2]);
            format(string, sizeof(string), "INSERT INTO `businesses` (`Id`, `bOwner`, `bLevel`, `bX`, `bY`, `bZ`) VALUES (NULL, 'None', '%d', '%f', '%f', '%f');",level, POS[0], POS[1], POS[2]);
            mysql_query(string);
            CreateDynamicMapIcon(POS[0], POS[1], POS[2], 31, 0, -1, -1, -1, 200);
            LoadBusiness(); //I don't think re-loading all business again is good.Make a stock function like AddBiz and add the new variables to the biz
        }
    }
    return 1;
}
Reply


Messages In This Thread
Loading business pickups. - by Haydz - 02.02.2011, 06:01
Re: Loading business pickups. - by PeteShag - 02.02.2011, 07:46
Re: Loading business pickups. - by Haydz - 02.02.2011, 07:49
Re: Loading business pickups. - by PeteShag - 02.02.2011, 08:00
Re: Loading business pickups. - by Haydz - 02.02.2011, 08:07

Forum Jump:


Users browsing this thread: 1 Guest(s)