04.04.2010, 14:21
I'm having problems showing up all of my gangzones, this is my complete code.
Ontop:
Under OnGameModeInit():
Under OnPlayerSpawn:
zones.cfg file:
As the topic says, when I go ingame, only the first gangzone shows up.
I've debugged the onplayerspawn thingie, and this showed up in server console:
Seems the problem is in the loop, it only loops through the first zone id.
Help is appreciated.
Ontop:
pawn Код:
#define MAX_ZONES 14
enum zInfo
{
zID,
zOwner[MAX_PLAYER_NAME],
zColor,
Float:zMinX,
Float:zMinY,
Float:zMaxX,
Float:zMaxY
};
new TurfInfo[MAX_ZONES][zInfo];
pawn Код:
LoadZones();
for(new i = 0; i < MAX_ZONES; i++)
{
TurfInfo[i][zID] = GangZoneCreate(TurfInfo[i][zMinX], TurfInfo[i][zMinY], TurfInfo[i][zMaxX], TurfInfo[i][zMaxY]);
}
pawn Код:
for(new i = 0; i < sizeof(TurfInfo); i++)
{
//GangZoneShowForPlayer(playerid, TurfInfo[i][zID], TurfInfo[i][zColor]);
GangZoneShowForAll(TurfInfo[i][zID], TurfInfo[i][zColor]);
return 1;
}
Код:
0|Max_Pegaz|-16777046|1570.448|-1875.704|1690.448|-1739.704 1|Anthony_Dinozo|-16777046|1825.708|-1750.933|1937.708|-1622.934 2|Max_Pegaz|-16777046|2213.031|-1732.393|2621.031|-1580.393
I've debugged the onplayerspawn thingie, and this showed up in server console:
Код:
[DEBUG]OnPlayerSpawn: turf id 0 shown. color -16777046
Help is appreciated.