CreateDynamicPolygon
#1

Hello. I am creating DynamicPolygon. But i have a question.

new Float:array[50];
for(new i; i < getCountryAreaPointsNumber(sqlID); i += 2)
{
new id = getFreeCountryMapIconSlot(sqlID);
array[i] = Country[sqlID][CountryAreaPoints][i];
array[i+1] = Country[sqlID][CountryAreaPoints][i+1];
// other code
}
Country[sqlID][CountryAreaID] = CreateDynamicPolygon(array);

So if my loop works, let`s say ~10 times. array will be inserted max in array[20] in that whay 30 array variables left free and not usable. And when i CreateDynamicPolygon, it creates 25 points, when i need that it create 10 points.
Reply
#2

I think i understood .

Country[sqlID][CountryAreaID] = CreateDynamicPolygon(array, -FLOAT_INFINITY, FLOAT_INFINITY, sk*2);

I set sk*2. That means that i set number of points .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)