Unreachable Code
#3

Works but its not updating the 3d Text Label - Please help..

pawn Код:
CMD:setentrancefee(playerid, params[])
{
    new string28[128], string2[128], bizid;
    for(new biz = 0; biz < MAX_BIZ; biz++)
    {
        if(IsPlayerInRangeOfPoint(playerid, 10, BizInfo[biz][IXCoord], BizInfo[biz][IYCoord], BizInfo[biz][IZCoord]))
        {
            if(GetPlayerVirtualWorld(playerid) == BizInfo[biz][VW])
            {
                if(!strcmp(BizInfo[biz][Owner], GetPlayerNameEx(playerid), true))
                {
                    if(sscanf(params, "i", params[0])) return SendClientMessageEx(playerid, COLOR_GRAD3, "USAGE: /setentrancefee [fee]");
                    if(params[0] < 0 || params[0] > 50)
                    {
                        SendClientMessageEx(playerid, COLOR_GRAD1, "Entrance Fee can not be below 0 or above 50!");
                        return 1;
                    }
                    BizInfo[PlayerInfo[playerid][pBizKey]][EntranceFee] = params[0];
                    SaveBizInfo(PlayerInfo[playerid][pBizKey]);
                    format(string2,sizeof(string2),"You have changed your Business Entrance Fee to %d", params);
                    SendClientMessageEx(playerid, COLOR_GRAD3, string2);
                    Delete3DTextLabel(Text3D:BizLabel[bizid]);
                    format(string28,sizeof(string28),"%s\nOwner: %s\nType: %s\nEntrance Fee: %d\nID: %d", BizInfo[bizid][Name], BizInfo[bizid][Owner],GetBizType(bizid), BizInfo[bizid][EntranceFee], bizid);
                    BizLabel[bizid] = Create3DTextLabel(string28, COLOR_BIZ, BizInfo[bizid][XCoord], BizInfo[bizid][YCoord], BizInfo[bizid][ZCoord], 10, 0, 0);
                }
                else
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, "You are not in your business.");
                }
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Unreachable Code - by San1 - 10.07.2013, 09:30
Re: Unreachable Code - by Konstantinos - 10.07.2013, 09:31
Re: Unreachable Code - by San1 - 10.07.2013, 09:39
Re: Unreachable Code - by Misiur - 10.07.2013, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)