SA-MP Forums Archive
Gangzone problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Gangzone problem (/showthread.php?tid=68626)



Gangzone problem - Outbreak - 12.03.2009

I've created 24 gangzones.

They're created under OnGameModeInit and show for a player when they connect.

When i go ingame, around 15 gangzones show out of the 24.

So i deleted some, thinking there was a problem with them and i would take a look after.

So i tried with 15 gangzones.. Only 8 of them show out of 15.

So i tried deleting some more gangzones, and left it to 8 zones. Now only 1 of them shows on the map, out of 8.

help


EDIT:

may be useful if i add this
pawn Code:
#define MAX_TURFS 24
#define TURF_DEFAULT 0x00000080
#define NONE 255
pawn Code:
enum tInfo
{
    tID,
    Float:tXmin,
    Float:tYmin,
    Float:tXmax,
    Float:tYmax,
    tColor,
    tOwner,
    tWar,
    tTimer
};

new TurfZones[MAX_TURFS][tInfo] = {

{0, 2704.0, -2055.0, 2848.5, -1880.0, TURF_DEFAULT, NONE, 0, 0}, //sevi
{1, 2431.0, -1742.0, 2653.0, -1600.0, TURF_DEFAULT, NONE, 0, 0}, //grov
{2, 2431.0, -1600.0, 2653.0, -1434.5, TURF_DEFAULT, NONE, 0, 0}, //g1a
{3, 2511.5, -1434.5, 2653.0, -1262.0, TURF_DEFAULT, NONE, 0, 0}, //g2ar
{4, 2373.5, -1434.5, 2511.5, -1262.0, TURF_DEFAULT, NONE, 0, 0}, //g2al
{5, 2340.0, -1742.0, 2431.0, -1434.5, TURF_DEFAULT, NONE, 0, 0}, //g+1
{6, 2373.5, -1262.0, 2653.0, -1155.5, TURF_DEFAULT, NONE, 0, 0}, //g3ah
{7, 2653.0, -1677.5, 2747.5, -1155.5, TURF_DEFAULT, NONE, 0, 0}, //g-1v
{8, 2340.0, -1982.5, 2537.5, -1742.0, TURF_DEFAULT, NONE, 0, 0}, //g1b
{9, 2193.5, -1982.5, 2340.0, -1658.0, TURF_DEFAULT, NONE, 0, 0}, //g1b+1
{10, 2171.25, -1434.5, 2373.5, -1300.5, TURF_DEFAULT, NONE, 0, 0}, //g2a+1
{11, 2193.5, -1658.0, 2340.0, -1434.5, TURF_DEFAULT, NONE, 0, 0}, //g+2
{12, 1965.5, -1982.5, 2193.5, -1730.0, TURF_DEFAULT, NONE, 0, 0}, //g1b+2
{13, 1965.5, -1730.0, 2193.5, -1575.0, TURF_DEFAULT, NONE, 0, 0}, //g+3
{14, 1965.5, -1575.0, 2193.5, -1434.5, TURF_DEFAULT, NONE, 0, 0}, //g+31a
{15, 1970.5, -1434.5, 2068.5, -1221.5, TURF_DEFAULT, NONE, 0, 0}, //g+32aL
{16, 2068.5, -1434.5, 2171.25, -1221.5, TURF_DEFAULT, NONE, 0, 0}, //g+32aR
{17, 2171.25, -1300.5, 2373.5, -1095.0, TURF_DEFAULT, NONE, 0, 0}, //g3a+1
{18, 2072.0, -1221.5, 2171.25, -995.0, TURF_DEFAULT, NONE, 0, 0}, //g3a+2
{19, 1970.5, -1045.0, 2072.0, -1078.0, TURF_DEFAULT, NONE, 0, 0}, //lsparkR
{20, 1850.0, -1345.0, 1970.5, -1045.0, TURF_DEFAULT, NONE, 0, 0}, //lsparkL
{21, 1815.5, -1613.5, 1970.5, -1345.0, TURF_DEFAULT, NONE, 0, 0}, //lsparkL1b
{22, 1765.0, -1982.5, 1965.5, -1613.5, TURF_DEFAULT, NONE, 0, 0}, //g+4
{23, 1705.0, -1450.5, 1850.0, -1150.0, TURF_DEFAULT, NONE, 0, 0} //lspark+1
};
Under OnPlayerConnect
pawn Code:
for (new t=0; t<MAX_TURFS; t++) GangZoneShowForPlayer(playerid, TurfZones[ t ][tID], TurfZones[ t ][tColor]);
OnGameModeInit
pawn Code:
for (new t=0; t<MAX_TURFS; t++)
    {
    GangZoneCreate( TurfZones[ t ][tXmin], TurfZones[ t ][tYmin], TurfZones[ t ][tXmax], TurfZones[ t ][tYmax] );
  }



Re: Gangzone problem - StrickenKid - 12.03.2009

lol look at yor code!
pawn Code:
MAX_TURFS 8
only 8 show cause that wat you put!
just change the 8 to how much gangzones you have total


Re: Gangzone problem - Outbreak - 12.03.2009

Shit, sorry my bad. I copied and pasted my script onto here, forgot to change 8 to 24 again... but even defined as 24 it doesnt show all zones.


EDIT: I've changed the define to 24. In my post and tried it again in my script, Still same problem. All gangzones not showing.


EDIT AGAIN;

pawn Code:
for (new t=0; t<MAX_TURFS; t++)
{
     TurfZones[ t ][tID] = GangZoneCreate( TurfZones[ t ][tXmin], TurfZones[ t ][tYmin], TurfZones[ t ][tXmax], TurfZones[ t ][tYmax] );
  }
This fixed it...