Text Label Not Updating
#1

When i change the fee to 5 it wont change the text label to say 5, it still shows whatever the old fee is and how can i fix it so i can update it please help..

pawn Код:
CMD:setentrancefee(playerid, params[])
{
    new bizid,string[128];
    if(PlayerInfo[playerid][pBizKey] != INVALID_BIZZ_ID && (IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[PlayerInfo[playerid][pBizKey]][XCoord], BizInfo[PlayerInfo[playerid][pBizKey]][YCoord], BizInfo[PlayerInfo[playerid][pBizKey]][ZCoord]) || IsPlayerInRangeOfPoint(playerid, 2.0, BizInfo[PlayerInfo[playerid][pBizKey]][IXCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IYCoord], BizInfo[PlayerInfo[playerid][pBizKey]][IZCoord])))
    {
        if(sscanf(params, "i", params[0])) return SendClientMessageEx(playerid, COLOR_GRAD3, "USAGE: /setentrancefee [fee]");
        BizInfo[PlayerInfo[playerid][pBizKey]][EntranceFee] = params[0];
        SaveBizInfo(bizid);
        Delete3DTextLabel(Text3D:BizLabel[bizid]);
        LoadBizInfo(bizid);
        format(string,sizeof(string),"You have changed your Business Entrance Fee to %d", params);
        SendClientMessageEx(playerid, COLOR_GRAD3, string);
        return 1;
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You don't own a business, or are not at one of them.");
        return 1;
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)