SA-MP Forums Archive
IsPlayerInDynamicArea(playerid, areaid) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: IsPlayerInDynamicArea(playerid, areaid) (/showthread.php?tid=474485)



IsPlayerInDynamicArea(playerid, areaid) - AnonScripter - 08.11.2013

can somebody tell me how to use this function, and what to put in areaid ?


Re: IsPlayerInDynamicArea(playerid, areaid) - Konstantinos - 08.11.2013

It's supposed when you use one of these:
pawn Код:
native CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicPolygon(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1);
it returns the areaid. Then you can check if the player is in the dynamic area.


Re: IsPlayerInDynamicArea(playerid, areaid) - AnonScripter - 08.11.2013

whats the difference between these 5 natives ? and can u please give me an example how to use


Re: IsPlayerInDynamicArea(playerid, areaid) - Konstantinos - 08.11.2013

I've never used them but the difference is self-explanatory from their name.

1st: It creates a circle.
2nd: It creates a rectangle.
3rd: It creates a sphere.
4th: It creates a cube.
5th: It creates a polygon.

Use ****** and I'm sure you'll find some examples.


Re: IsPlayerInDynamicArea(playerid, areaid) - AnonScripter - 08.11.2013

thanks it fixed