SA-MP Forums Archive
Text Label Not Updating - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Text Label Not Updating (/showthread.php?tid=447312)



Text Label Not Updating - San1 - 29.06.2013

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;
    }
}