Invalid ID Help.
#1

Hi there,I tried to make a Command that fills a business on command performed by admin but any valid Biz id i choose it says Invalid Business ID think i have something wrong with the line with Invalid Business ID in the Command So Can please help me?The code
Код:
CMD:giveproducts(playerid, params[])
{
	new amount, idx, string[128];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
	if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");

	if(sscanf(params, "i", amount, idx)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /giveproducts [bizid] [amount]");
	foreach(Player, i)
    if(!BizInfo[idx][bType]) return SendClientMessage(playerid, COLOR_GREY, "Invalid Business ID.");
   	BizInfo[idx][bProducts] = amount;
	format(string, sizeof(string), "AdmInfo: %s has set business id %d's products to %d.(Owner: %s)", RPN(playerid), idx, amount, BizInfo[idx][bOwner]);
	SendAdminMessage(COLOR_DARKRED, 1, string);
    return 1;
}
Reply


Messages In This Thread
Invalid ID Help. - by Laure - 03.11.2012, 11:18
Re: Invalid ID Help. - by DBan - 03.11.2012, 11:30
Re: Invalid ID Help. - by Laure - 03.11.2012, 11:36
Re: Invalid ID Help. - by lamarr007 - 03.11.2012, 11:40
Re: Invalid ID Help. - by Laure - 03.11.2012, 11:43
Re: Invalid ID Help. - by Laure - 03.11.2012, 12:05
Re: Invalid ID Help. - by MrCoder - 03.11.2012, 12:07
Re: Invalid ID Help. - by Private200 - 03.11.2012, 12:48
Re: Invalid ID Help. - by tyler12 - 03.11.2012, 13:21
Re: Invalid ID Help. - by Laure - 03.11.2012, 13:41

Forum Jump:


Users browsing this thread: 5 Guest(s)