What's wrong with my code (detection of near job id's)
#1

Код:
YCMD:yakin(playerid, params[], help)
{
	new sMeslek[128+1];
	
    for(new i = 0; i < MAKSIMUM_MESLEK; i++) // Meslek ID - Job ID
    {
    
        if(IsPlayerInRangeOfPoint(playerid, 5.0, Meslek[i][meslekX], Meslek[i][meslekY], Meslek[i][meslekZ]))
        {
            format(sMeslek, sizeof(sMeslek), "Nearest job's SQLID: %d", Meslek[i][meslekID]);
			SendClientMessage(playerid, -1, sMeslek);
			break;
		} else return Hata(playerid, "There isn't a job near you.");
		
    }
	return 1;
}
It works for Job SQLID 1 but not for 2. Why is that? Is it because of the 'break' ?
Reply


Messages In This Thread
What's wrong with my code (detection of near job id's) - by WhoIsYourDaddy - 31.03.2015, 22:13
Re: What's wrong with my code (detection of near job id's) - by Mauzen - 31.03.2015, 22:31
Re: What's wrong with my code (detection of near job id's) - by WhoIsYourDaddy - 31.03.2015, 22:37

Forum Jump:


Users browsing this thread: 1 Guest(s)