How to make an array with positions? it is possible?
#9

Quote:
Originally Posted by GospodinX
Посмотреть сообщение
If you make loop,and if player is not on near by it coordinates he will get two times message "You are not in the site positions!

So it's better make on this way:

Код:
for(new i= 0; i < sizeof( PositionsSite ); i++)
{
    if(IsPlayerInRangeOfPoint(playerid, 3.0, PositionsSite[i][0],PositionsSite[i][1],PositionsSite[i][2])) {

 ///Player is near by an positionssite(i)
}
}
You mean to make this?
PHP код:
 if(!IsPlayerInRangeOfPoint(playerid3.0PositionsSite[0][0],PositionsSite[0][1],PositionsSite[0][2])) return SendClientMessage(playeridCOLOR_LIGHTRED"* You are not in the site positions !"); 
But this only detect the position 0 in array right? not the 2 positions, to detect 2 positions i need a loop?! thanks
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)