For Cycles Ending?
#4

Quote:
Originally Posted by Bessensap
Посмотреть сообщение
pawn Код:
if(!IsPlayerInRangeOfPoint(playerid,5.0,Thing[I][X],Thing[I][Y],Thing[I][Z]) return SendClientMessage(playerid,/*COLOR*/,/*Text*/);
Thanks, but that wouldt work, it would return that message each time it was false (9 to 10 times since the cycle runs 10 times)

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
This should work:

pawn Код:
new inarea = false;
for(new I;I<10;I++)
{
    if(IsPlayerInRangeOfPoint(playerid,5.0,Thing[I][X],Thing[I][Y],Thing[I][Z]);
    {
      if(Somethihg)
      {
          Some stuff here
      }
      else return SendClientmessage(playerid,COLOR,TExt);
      inarea = true;
     }
     else return  SendClientmessage(playerid,COLOR,TExt);
}
if(!inarea) SendClientMessage(...);
return 1;
Thanks, it did work...
Reply


Messages In This Thread
For Cycles Ending? - by almighty - 09.11.2010, 20:36
Re: For Cycles Ending? - by Bessensap - 09.11.2010, 20:40
Re: For Cycles Ending? - by Mauzen - 09.11.2010, 20:46
Respuesta: Re: For Cycles Ending? - by almighty - 09.11.2010, 20:55

Forum Jump:


Users browsing this thread: 1 Guest(s)