18.08.2017, 10:26
Put it outside the loop and return true at the end.
PHP код:
CMD:knock(playerid, params[])
{
new bool:nearHouse = false;
for(new idx; idx < MAX_HOUSES; idx++)
{
if(IsPlayerInRangeOfPoint(playerid, ...)
{
nearHouse = true;
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
//code;
}
}
return 1;
}
if(nearHouse == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You are not near a house.");
}