#6

the reason is the SendClientMessage being outside of the loop. i assume there is only 1 house for a player, so if you break/return from the nested loop (good idea btw), it wont call the SCM. try this, slightly changed:
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	for(new i; i < MAX_HOUSES; i++)
	{
		if(pickupid == housepickup[i])
		{
			new str[120];
			format(str, sizeof(str),"You are standing on %s house",houseinfo[i][owner]);
			printf("%s",houseinfo[i][owner]);
			SendClientMessage(playerid,COLOR_GREEN,str);
			return 1;
		}
	}
	return 1;
}
Reply


Messages In This Thread
loop - by BlackRaven - 25.01.2013, 08:38
Re: loop - by Da_Noob - 25.01.2013, 08:39
Re: loop - by EpicNinja - 25.01.2013, 08:39
Re: loop - by coakiddo - 25.01.2013, 08:41
Re: loop - by BlackRaven - 25.01.2013, 08:42
Re: loop - by Babul - 25.01.2013, 08:48
Re: loop - by BlackRaven - 25.01.2013, 08:51

Forum Jump:


Users browsing this thread: 1 Guest(s)