SA-MP Forums Archive
3D 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: 3D Text Label not Updating (/showthread.php?tid=446973)



3D Text Label not Updating - San1 - 28.06.2013

It suppose to fix the Text Label where it shows the new entrance fee but its not updating it? how can i fix this
No Errors on compile
CMD:
pawn Код:
CMD:setentrancefee(playerid, params[])
{
    new bizid,string2[128], string28[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(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);
        return 1;
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "You don't own a business, or are not at one of them.");
        return 1;
    }
}



Re: 3D Text Label not Updating - dEcooR - 28.06.2013

why do you use params[0] ? wtf
and btw try to change this

Код:
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);
to this

Код:
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);
Update3DTextLabelText(BizLabel[bizid], COLOR_BIZ, string28);



Re: 3D Text Label not Updating - San1 - 28.06.2013

Its not Updating.. i changed and still says 1, It only updates when i Quit and Join server again wtf?