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;
}
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);
}
if(dialogid == BIZ_NAME)
{
new bizid = BizIDS[playerid], string28[150];
if(response)
{
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);
}
else
{
ShowPlayerDialog(playerid, BIZ_DIALOG, DIALOG_STYLE_LIST, "Business Management", "Change Business Name", "Confirm", "Cancel");
}
}
Read the forum rules. no bumping your thread, you need to wait at least 24 hours.
|