A little help regarding polygons
#2

Well basically, even if this was the correct code or not, not all the pickups are going to be seen. As of 0.3z, the limit of pickups is 4096 for each client. (https://sampwiki.blast.hk/wiki/Limits)

I tested this, and by creating a new pickup every '3' units, you reach a total of 8530 pickups within the polygon. By creating a new pickup every '5' units, you reduce this amount to 3070 which is well below the pickup limit. So your code would simply be:
pawn Code:
new Float:zones_points_9[] = {
    -291.0,-76.0,39.0,-144.0,56.0,-73.0,84.0,29.0,20.0,75.0,-100.0,147.0,-199.0,184.0,-291.0,-76.0
};
public OnGameModeInit()
{
    Terrenos[9] = CreateDynamicPolygon(zones_points_9);
    new Float:zPos;
    for(new y = -144; y < 184; y += 5)
    {
        for(new x = -291; x < 84; x += 5)
        {
            if(!IsPointInDynamicArea(Terrenos[9], x, y, 0.0)) continue;
            GetPointZPos(x, y, zPos);
            CreateDynamicPickup(1239, 2, x, y, zPos + 2, -1, -1, -1, 50.0);
            printf("%d %d", x, y);
        }
    }
    return 1;
}
Reply


Messages In This Thread
A little help regarding polygons - by JustBored - 19.12.2014, 01:05
Re: A little help regarding polygons - by Threshold - 19.12.2014, 04:39

Forum Jump:


Users browsing this thread: 1 Guest(s)