Not all gang zones show
#1

Hi

I have some problems. I'm making a new game mode which uses gang zones.
I took the coords for the zones right from the info.zon file, so I know the coordinates are correct.

But when the player spawns, only about half of the zones is shown (see map).

pawn Код:
public OnPlayerSpawn(playerid)
{
    for(new i = 0; i <= MAX_ZONES_PER_AREA; i++)
    {
        GangZoneShowForPlayer(playerid, GZ_LAIR[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_ELCO[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_LIND[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_LDOC[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_VERO[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_BLUF[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_MARI[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_CONF[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_GLEN[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_COMM[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_PER[i],  0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_LMEX[i],     0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_IWD[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_JEF[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_CHC[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_GAN[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_EBE[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_ELS[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_LFL[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_LDT[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_MULINT[i],   0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_MUL[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_MKT[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_VIN[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_SUN[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_SMB[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_ROD[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_RIH[i],      0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_UNITY[i],    0x0000FF66);
        GangZoneShowForPlayer(playerid, GZ_PLS[i],      0x0000FF66);
    }
    return 1;
}
Los Santos is split into 30 areas, with the use of 142 gang zones. How can I fix it, so ALL zones show when a player spawns? I added some screens:

Whole map (note missing part of Los Santos Airport):


Los Santos Airport and El Corona only enabled:

Reply
#2

what is MAX_ZONES_PER_AREA defined as?
Reply
#3

15
Reply
#4

Quote:
Originally Posted by Vince
15
change it to 30 or 31. That's probably why
Reply
#5

No effect.
The area's are built up like this:

pawn Код:
// [13] --- Mulholland ---
    GZ_MUL[0]   = GangZoneCreate(687.802, -860.619, 911.802, -768.027); //Mulholland
    GZ_MUL[1]   = GangZoneCreate(737.573, -768.027, 1142.29, -674.885); //Mulholland
    GZ_MUL[2]   = GangZoneCreate(861.085, -674.885, 1156.55, -600.896); //Mulholland
    GZ_MUL[3]   = GangZoneCreate(1281.13, -452.425, 1641.13, -290.913); //Mulholland
    GZ_MUL[4]   = GangZoneCreate(1269.13, -768.027, 1414.07, -452.425); //Mulholland
    GZ_MUL[5]   = GangZoneCreate(1414.07, -768.027, 1667.61, -452.425); //Mulholland
    GZ_MUL[6]   = GangZoneCreate(768.694, -954.662, 952.604, -860.619); //Mulholland
    GZ_MUL[7]   = GangZoneCreate(1096.47, -910.17, 1169.13, -768.027); //Mulholland
    GZ_MUL[8]   = GangZoneCreate(952.604, -937.184, 1096.47, -860.619); //Mulholland
    GZ_MUL[9]   = GangZoneCreate(911.802, -860.619, 1096.47, -768.027); //Mulholland
    GZ_MUL[10] = GangZoneCreate(1169.13, -910.17, 1318.13, -768.027); //Mulholland
    GZ_MUL[11] = GangZoneCreate(1357.0, -926.999, 1463.9, -768.027); //Mulholland
    GZ_MUL[12] = GangZoneCreate(1318.13, -910.17, 1357.0, -768.027); //Mulholland
And the MAX_ZONES_PER_AREA refers to the size of the array. This one above is also the largest amount of zones (13) for an area (Mulholland).
Reply
#6

Problem solved

I found a solution in this topic: http://forum.sa-mp.com/index.php?topic=92819.0
So far, I've added 53 of the 142 gang zones, and none of them has disappeard yet.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)