28.06.2013, 05:49
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:
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;
}
}