Help me to complete a command!
#1

Ok here i tried to make a command which shows me the Businesses id and owner of the biz within 2 meters of me but it is not working at all.Codes Below
Код:
CMD:nearbiz(playerid, params[])
{
	new idx, string[128];
    if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command");
	{
		SendClientMessage(playerid, COLOR_LIGHTGREEN, "* All businesses in the range of 2 meters of you.");
		new Float:X, Float:Y, Float:Z;
		new Float:X2, Float:Y2, Float:Z2;
  		GetPlayerPos(playerid, X2, Y2, Z2);
		for(new i;i<MAX_BIZ;i++)
		{
			if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]))
			{
				    new string[128];
			    	format(string, sizeof(string), "Business ID: %d | Owned by: %s", idx, BizInfo[idx][bOwner]);
			    	SendClientMessage(playerid, COLOR_WHITE, string);
			}
		}
	}
	return 1;
}
Help will be appreciated!
Reply


Messages In This Thread
Help me to complete a command! - by Laure - 12.12.2012, 11:26
Re: Help me to complete a command! - by David (Sabljak) - 12.12.2012, 11:28
Re: Help me to complete a command! - by Threshold - 12.12.2012, 11:28
Re: Help me to complete a command! - by Laure - 12.12.2012, 11:40

Forum Jump:


Users browsing this thread: 1 Guest(s)