When creating dynamic polygon - 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: When creating dynamic polygon (
/showthread.php?tid=473782)
When creating dynamic polygon -
Tagathron - 04.11.2013
I'm trying to create a dynamic area,using streamer plugin,and i'm making a dynamic polygon.
So first i made some points,stored in an array:
Code:
new Float:pArea [][] =
{
{1323.5114,10.8203,158.5349},
{1323.1530,10.8203,267.2626},
{1342.7168,10.8203,357.8168},
{1343.3971,10.8203,90.2510}
};
But,how do i put that into this:
Code:
CreateDynamicPolygon(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1);
Re: When creating dynamic polygon -
Pottus - 04.11.2013
pawn Code:
CreateDynamicPolygon(pArea, ......
static const Float:pArea [4][3] =
{
{1323.5114,10.8203,158.5349},
{1323.1530,10.8203,267.2626},
{1342.7168,10.8203,357.8168},
{1343.3971,10.8203,90.2510}
};
Re: When creating dynamic polygon -
Tagathron - 04.11.2013
Code:
CreateDynamicPolygon(pArea, 10.0, 10.0, sizoef(pArea), -1, -1, -1);
Says : array dimensions do not match?
Re: When creating dynamic polygon -
Vince - 04.11.2013
Quote:
Originally Posted by Incognito
- The points in CreateDynamicPolygon and CreateDynamicPolygonEx need to be specified as a sequence of ordered pairs (x1, y1, x2, y2, ..., xn, yn). The number of elements in the array must be divisible by two for this reason. The first point must also be equal to the last point to form a closed path.
|
You also can't specify heights in a normal dynamic polygon.
Re: When creating dynamic polygon -
Tagathron - 04.11.2013
Thanks there are no errors now.Also i didn't need 2-dimensional arrays for a couple of x points,i just rushed into doing this without any sense.
Re: When creating dynamic polygon -
rayan khan - 02.11.2015
Download it and modify it for your self.
http://forum.sa-mp.com/showthread.ph...40#post3606940