15.07.2013, 16:52
Hello All
I got a Problem with CMD:asellbiz When I do it it Sell All business Not only the one I wrote his id
So can Any one help meCMD text
Please Write the right CMD and send me it Or post it in a reply
+ sorry on my english
I got a Problem with CMD:asellbiz When I do it it Sell All business Not only the one I wrote his id
So can Any one help meCMD text
PHP код:
CMD:asellbiz(playerid, params[])
{
new bizid, string[128];
if(PlayerInfo[playerid][pAdmin] < 100005) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
if(sscanf(params, "i", bizid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /asellbiz [bizid]");
if(!BizInfo[bizid][bType]) return SendClientMessage(playerid, COLOR_GREY, "Invalid business id.");
if(!strcmp("The State", BizInfo[bizid][bOwner], true)) return SendClientMessage(playerid, COLOR_GREY, "This business is not owned by anybody.");
foreach(Player, i)
{
{
PlayerInfo[i][pBiz] = 0;
format(string, sizeof(string), " Administrator %s has sold your business.", RPN(playerid));
SendClientMessage(i, COLOR_WHITE, string);
}
}
format(string, sizeof(string), "AdmWarn: %s has sold %s's business. (ID %d)", RPN(playerid), BizInfo[bizid][bOwner], bizid);
ABroadCast(COLOR_DARKRED, string, 2 );
format(BizInfo[bizid][bOwner], 32, "The State");
format(string, sizeof(string), "ID: %d\n%s\nOwner: %s\nStatus: For Sale\nPrice: $%d", bizid, RBT(bizid), BizInfo[bizid][bOwner], BizInfo[bizid][bPrice]);
UpdateDynamic3DTextLabelText(BizInfo[bizid][bText], COLOR_WHITE, string);
return 1;
}
+ sorry on my english