PDA

View Full Version : GangZoneShowForAll


nezo2001
22/01/2015, 12:58 PM
I have this code
for(new i = 0; i < sizeof(ZoneInfo); i++)
{
ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
GangZoneShowForAll(i, ZoneInfo[i][zColor]);
}
The gangs created but they don't show also i tried it like that
for(new i = 0; i < sizeof(ZoneInfo); i++)
{
ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
GangZoneShowForAll(ZoneID[i], ZoneInfo[i][zColor]);
}
Also didn't work.
Please Help !

Schneider
22/01/2015, 01:00 PM
Are you sure the colors have the right format?

xVIP3Rx
22/01/2015, 01:01 PM
what's the "ZoneInfo[i][zColor]" and show some of the ZoneInfo[][]s

nezo2001
22/01/2015, 01:02 PM
enum eZone
{
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY,
zTeam,
zColor
}

new ZoneInfo[][eZone] = {
{1994.33, -1100.82, 2056.86, -920.815, GANG_RIFAS, GANG_RIFAS_COLOR},
{2056.86, -1126.32, 2126.86, -920.815, GANG_RIFAS, GANG_RIFAS_COLOR},
{2185.33, -1154.59, 2281.45, -934.489, GANG_RIFAS, GANG_RIFAS_COLOR},
{2126.86, -1126.32, 2185.33, -934.489, GANG_RIFAS, GANG_RIFAS_COLOR},
{2421.03, -1628.53, 2632.83, -1454.35, GANG_RIFAS, GANG_RIFAS_COLOR},
{2222.56, -1628.53, 2421.03, -1494.03, GANG_RIFAS, GANG_RIFAS_COLOR},
{2266.26, -1494.03, 2381.68, -1372.04, GANG_RIFAS, GANG_RIFAS_COLOR},
{2381.68, -1494.03, 2421.03, -1454.35, GANG_RIFAS, GANG_RIFAS_COLOR},
{2281.45, -1372.04, 2381.68, -1135.04, GANG_RIFAS, GANG_RIFAS_COLOR},
{2381.68, -1454.35, 2462.13, -1135.04, GANG_RIFAS, GANG_RIFAS_COLOR},
{2462.13, -1454.35, 2581.73, -1135.04, GANG_RIFAS, GANG_RIFAS_COLOR},
{2056.86, -1449.67, 2266.21, -1372.04, GANG_RIFAS, GANG_RIFAS_COLOR},
{1996.91, -1449.67, 2056.86, -1350.72, GANG_RIFAS, GANG_RIFAS_COLOR},
{2124.66, -1494.03, 2266.21, -1449.67, GANG_RIFAS, GANG_RIFAS_COLOR},
{2056.86, -1372.04, 2281.45, -1210.74, GANG_RIFAS, GANG_RIFAS_COLOR},
{2056.86, -1210.74, 2185.33, -1126.32, GANG_RIFAS, GANG_RIFAS_COLOR},
{2185.33, -1210.74, 2281.45, -1154.59, GANG_RIFAS, GANG_RIFAS_COLOR},
{1812.62, -1350.72, 2056.86, -1100.82, GANG_RIFAS, GANG_RIFAS_COLOR},
{1812.62, -1449.67, 1996.91, -1350.72, GANG_RIFAS, GANG_RIFAS_COLOR},
{1812.62, -1100.82, 1994.33, -973.38, GANG_RIFAS, GANG_RIFAS_COLOR},
{1971.66, -1852.87, 2222.56, -1742.31, GANG_RIFAS, GANG_RIFAS_COLOR},
{1812.62, -1852.87, 1971.66, -1742.31, GANG_RIFAS, GANG_RIFAS_COLOR},
{1812.62, -1742.31, 1951.66, -1602.31, GANG_RIFAS}, GANG_RIFAS_COLOR,
{1951.66, -1742.31, 2124.66, -1602.31, GANG_RIFAS, GANG_RIFAS_COLOR},
{1812.62, -1602.31, 2124.66, -1449.67, GANG_RIFAS, GANG_RIFAS_COLOR},
{2124.66, -1742.31, 2222.56, -1494.03, GANG_RIFAS, GANG_RIFAS_COLOR},
{1970.62, -2179.25, 2089.0, -1852.87, GANG_RIFAS, GANG_RIFAS_COLOR},
{2089.0, -2235.84, 2201.82, -1989.9, GANG_RIFAS, GANG_RIFAS_COLOR},
{2089.0, -1989.9, 2324.0, -1852.87, GANG_RIFAS, GANG_RIFAS_COLOR},
{2201.82, -2095.0, 2324.0, -1989.9, GANG_RIFAS, GANG_RIFAS_COLOR},
{2703.58, -2126.9, 2959.35, -1852.87, GANG_RIFAS, GANG_RIFAS_COLOR},
{-464.515, 2217.68, -208.57, 2580.36, GANG_RIFAS, GANG_RIFAS_COLOR},
{-208.57, 2123.01, 114.033, 2337.18, GANG_RIFAS, GANG_RIFAS_COLOR},
{-208.57, 2337.18, 8.42999, 2487.18, GANG_RIFAS, GANG_RIFAS_COLOR},
{1692.62, -2179.25, 1812.62, -1842.27, GANG_RIFAS, GANG_RIFAS_COLOR},
{2222.56, -1852.87, 2632.83, -1722.33, GANG_RIFAS, GANG_RIFAS_COLOR},
{2222.56, -1722.33, 2632.83, -1628.53, GANG_RIFAS, GANG_RIFAS_COLOR},
{342.648, -2173.29, 647.712, -1684.65, GANG_RIFAS, GANG_RIFAS_COLOR},
{72.6481, -2173.29, 342.648, -1684.65, GANG_RIFAS, GANG_RIFAS_COLOR},
{1161.52, -1722.26, 1323.9, -1577.59, GANG_RIFAS, GANG_RIFAS_COLOR},
{1046.15, -1722.26, 1161.52, -1577.59, GANG_RIFAS, GANG_RIFAS_COLOR},
{1096.47, -1130.84, -89.0838, 1252.33,GANG_RIFAS, GANG_RIFAS_COLOR},
{1096.47, -1026.33, -89.0839, 1252.33,GANG_RIFAS, GANG_RIFAS_COLOR},
{952.663, -1130.84, -89.084, 1096.47,GANG_RIFAS, GANG_RIFAS_COLOR},
{1252.33, -1130.85, -89.0839, 1378.33,GANG_RIFAS, GANG_RIFAS_COLOR},
{1252.33, -1026.33, -89.0839, 1391.05,GANG_RIFAS, GANG_RIFAS_COLOR},
{1252.33, -926.999, -89.0839, 1357.0,GANG_RIFAS, GANG_RIFAS_COLOR},
{2581.73, -1454.35, -89.0839, 2632.83,GANG_RIFAS, GANG_RIFAS_COLOR},
{2581.73, -1393.42, -89.0839, 2747.74,GANG_RIFAS, GANG_RIFAS_COLOR},
{2747.74, -1498.62, -89.0839, 2959.35,GANG_RIFAS, GANG_RIFAS_COLOR},
{2747.74, -1120.04, -89.0839, 2959.35,GANG_RIFAS, GANG_RIFAS_COLOR},
{2632.74, -1135.04, -89.0839, 2747.74,GANG_RIFAS, GANG_RIFAS_COLOR},
{2281.45, -1135.04, -89.0839, 2632.74,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2741.07, 1268.41, -4.57764e-005, -2533.04,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2533.04, 1358.9, -4.57764e-005, -1996.66,GANG_RIFAS, GANG_RIFAS_COLOR},
{-1996.66, 1358.9, -4.57764e-005, -1524.24,GANG_RIFAS, GANG_RIFAS_COLOR},
{-1982.32, 1274.26, -4.57764e-005, -1524.24,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2274.17, 744.17, -6.10352e-005, -1982.32,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2274.17, 578.396, -7.62939e-005, -2078.67,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2329.31, 458.411, -7.62939e-005, -1993.28,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2411.22, 265.243, -9.15527e-005, -1993.28,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2253.54, 373.539, -9.15527e-005, -1993.28,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2270.04, -324.114, -0.00012207, -1794.92,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2173.04, -222.589, -0.000106812, -1794.92,GANG_RIFAS, GANG_RIFAS_COLOR},
{-1993.28, 265.243, -9.15527e-005, -1794.92,GANG_RIFAS, GANG_RIFAS_COLOR},
{-1794.92, 249.904, -9.15527e-005, -1242.98,GANG_RIFAS, GANG_RIFAS_COLOR},
{-1794.92, -50.0963, -0.000106812, -1499.89,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2007.83, 56.3063, 0.0, -1922.0,GANG_RIFAS, GANG_RIFAS_COLOR},
{-2646.4, -355.493, 0.0, -2270.04,GANG_RIFAS, GANG_RIFAS_COLOR}
};
new ZoneID[sizeof(ZoneInfo)];
And

#define GANG_GROVES_COLOR 0x83F52C80
#define GANG_BALLAS_COLOR 0xE0427F80
#define GANG_AZTECAS_COLOR 0x98F5FF80
#define GANG_VAGOS_COLOR 0xFFCC1180
#define GANG_TRIAD_COLOR 0xD0209080
#define GANG_DA_NANG_BOYS_COLOR 0xCD5B4580
#define GANG_RIFAS_COLOR 0x87CEFF80
#define GANG_RUSSIAN_MAFIAS_COLOR 0xEEDC8280
#define GANG_ITALIAN_MAFIAS_COLOR 0xFA9A5080
#define GANG_BIKER_COLOR 0x584E5680

xVIP3Rx
22/01/2015, 01:06 PM
The coordination and the colors seems to have no problems,
Try to show it for only one player, when he logs in for testing..

Schneider
22/01/2015, 01:12 PM
The code works fine for me when I add it to my server... In what callback did you put the GangZoneShowForAll function?

nezo2001
22/01/2015, 02:06 PM
OnGameModInt

Schneider
22/01/2015, 02:10 PM
That will not work since there are no players online when OnGameModeInit is called...

Put it at OnPlayerSpawn.

nezo2001
22/01/2015, 02:15 PM
So when every player spawn it will work !!
I can't because the gang color is changable by attacking so it will......

Schneider
22/01/2015, 02:23 PM
Then you should use GangZoneShowForPlayer

nezo2001
22/01/2015, 02:27 PM
How?

Schneider
22/01/2015, 02:33 PM
The same way as GangZoneShowForAll at OnPlayerSpawn, just with an extra 'playerid' parameter.