CreateDynamicPolygon - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: CreateDynamicPolygon (
/showthread.php?tid=580942)
CreateDynamicPolygon -
DreDasLT - 09.07.2015
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.
Re: CreateDynamicPolygon -
DreDasLT - 09.07.2015
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

.