09.07.2015, 14:00
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.
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.