How to detect if a player is in range of a object?
#6

Any shape might work, but a circle or sphere is probably the most fitting. And yes, -1 means all. It works just like pickups, honestly;
pawn Код:
new gMyArea;

gMyArea = CreateDynamicSphere(...);

public OnPlayerEnterDynamicArea(playerid, areaid)
{
    if(areaid == gMyArea)
    {
        // stuff
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)