When creating dynamic polygon
#1

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);
Reply
#2

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}
};
Reply
#3

Code:
CreateDynamicPolygon(pArea, 10.0, 10.0, sizoef(pArea), -1, -1, -1);
Says : array dimensions do not match?
Reply
#4

Quote:
Originally Posted by Incognito
View Post
  • 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.
Reply
#5

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.
Reply
#6

Download it and modify it for your self.

http://forum.sa-mp.com/showthread.ph...40#post3606940
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)