28.02.2017, 17:55
Hello I have a problem On cmd of business system can any one help me?
the prob is the cmd not working it cmd:editbizname im mena with not working the biz description not changed but the just i see the dialog ..
And This Is the Dialog plz any one tell me what is wrong?
the prob is the cmd not working it cmd:editbizname im mena with not working the biz description not changed but the just i see the dialog ..
PHP код:
CMD:editbizname(playerid)
{
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))
{
ShowPlayerDialog(playerid, BIZ_NAME, DIALOG_STYLE_INPUT, "Business Management", "Change Business Name", "Confirm", "Cancel");
BizIDS[playerid] = biz;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You're not in your business.");
}
}
}
}
return 1;
}
PHP код:
if(dialogid == BIZ_NAME)
{
new bizid = BizIDS[playerid], string28[150];
if(!response) { ShowPlayerDialog(playerid, BIZ_DIALOG, DIALOG_STYLE_LIST, "Business Management", "Change Business Name", "Confirm", "Cancel"); }
format(BizInfo[bizid][Name], 128, inputtext);
format(string28,sizeof(string28), "Business name changed to %s.", inputtext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string28);
Delete3DTextLabel(Text3D:BizLabel[bizid]);
format(string28,sizeof(string28),"%s\nOwner: %s\nType: %s\nID: %d", BizInfo[bizid][Name], BizInfo[bizid][Owner],GetBizType(bizid), bizid);
BizLabel[bizid] = Create3DTextLabel(string28, COLOR_BIZ, BizInfo[bizid][XCoord], BizInfo[bizid][YCoord], BizInfo[bizid][ZCoord], 10, 0, 0);
}