Is player in range of an object
#4

It would be better to place all of your ATM objects into an array.
pawn Код:
new atm[3];
atm[0]=CreateObject(...
atm[1]=CreateObject(...
atm[2]=CreateObject(...
That way you can loop through them easily
pawn Код:
new Float:x,Float:y,Float:z;
for(new object;object<sizeof(atm);object++)
{
    GetObjectPos(atm[object],x,y,z);
    if(IsPlayerInRangeOfPoint(playerid,5.0,x,y,z))
    {
        //code
        break;
    }
}
Reply


Messages In This Thread
Is player in range of an object - by The Woody - 11.04.2011, 21:51
Re: Is player in range of an object - by Voldemort - 11.04.2011, 22:08
Re: Is player in range of an object - by The Woody - 11.04.2011, 22:10
Re: Is player in range of an object - by Joe Staff - 11.04.2011, 22:19
Re: Is player in range of an object - by Pooh7 - 11.04.2011, 22:22
Re: Is player in range of an object - by The Woody - 11.04.2011, 22:26
Re: Is player in range of an object - by Joe Staff - 11.04.2011, 22:33
Re: Is player in range of an object - by The Woody - 12.04.2011, 11:21
Re: Is player in range of an object - by CyNiC - 12.04.2011, 12:59
Re: Is player in range of an object - by The Woody - 12.04.2011, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)