Command Problem
#1

No Errors - It Says The Business is Owned When its not even bought yet - Everything confirms its not bought - This command says its already bought - can sum1 plz help me ?
pawn Код:
CMD:buybiz(playerid, params[])
{
    for(new biz = 0; biz < MAX_BIZ; biz++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[biz][ex], BizInfo[biz][ey], BizInfo[biz][ez]))
        {
            if(PlayerInfo[playerid][BizID] == 0)
            {
                if(BizInfo[biz][Owned] == 1)
                {
                    new string[128], string2[128], pname[MAX_PLAYER_NAME];
                    BizInfo[biz][Owned] = 1;
                    BizInfo[biz][Owner] = GetPlayerName(playerid, pname, sizeof(pname));
                    PlayerInfo[playerid][BizID] = biz;
                    format(string2, sizeof(string2), BPATH, biz);
                    INI_ParseFile(string2,"LoadBiz_%s", .bExtra = true, .extra = biz);
                    format(string, sizeof(string),"You Have Bought Business ID (%d)", biz);
                    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You already own a business");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "This business is already Owned");
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Command Problem - by San1 - 22.07.2013, 21:13
Re: Command Problem - by IceCube! - 22.07.2013, 21:18
Re: Command Problem - by San1 - 22.07.2013, 21:28

Forum Jump:


Users browsing this thread: 1 Guest(s)