12.01.2014, 12:24
Ive got a problem. I have a RivalWars system on my gamemode and yesterday, I decided to delete two gangs.
I made some changes at the factions IDs (i thought i replaced the IDs in all the places needed) and i changed some faction names and colors.
Now, i noticed that the GangZones on the map are not showing, but the RivalWars system is still working (you can use /takezone to start the war on a turf but you cant see the turf on the map)
Something its weird, I still can see 2 turfs (The turfs owned by the faction with ID: 9) but the others not.
Some codes that may help you finding the answer:
gzones.cfg:
None|0.000000|0.000000|0.000000|0.000000|0
None|2317.774414|-1473.314086|2405.774414|-1257.314086|9
None|2404.928710|-1473.839965|2484.928710|-1257.839965|8
None|1878.816162|-1357.516235|1974.816162|-1141.516235|7
None|1975.273681|-1357.544799|2071.273681|-1141.544799|6
None|2215.062500|-1876.189208|2415.062500|-1780.189208|7
None|2215.062500|-1976.052856|2415.062500|-1872.052856|6
None|1954.030517|-2123.559326|2154.030517|-2051.559326|9
None|1954.030517|-2053.793457|2154.030517|-1981.793334|8
I made some changes at the factions IDs (i thought i replaced the IDs in all the places needed) and i changed some faction names and colors.
Now, i noticed that the GangZones on the map are not showing, but the RivalWars system is still working (you can use /takezone to start the war on a turf but you cant see the turf on the map)
Something its weird, I still can see 2 turfs (The turfs owned by the faction with ID: 9) but the others not.
Some codes that may help you finding the answer:
Код:
//----- GangZone
LoadZones();
for(new i=0; i < sizeof(ZoneInfo); i++)
{
Zones[i] = GangZoneCreate(ZoneInfo[i][zMinX], ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
}
Код:
public ShowZones()
{
for(new z=0; z < sizeof(ZoneInfo); z++)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
GangZoneShowForPlayer(i,Zones[z], GetTeamZoneColor(ZoneInfo[z][zTeam]));
if(takezone == 1 && ZoneInfo[z][zTakeOn] == 1) GangZoneFlashForPlayer(i,z,COLOR_WHITE);
}
}
return 1;
}
Код:
public LoadZones()
{
new arrCoords[6][64];
new strFromFile2[256];
new File: file = fopen("gzones.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(ZoneInfo))
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, '|');
strmid(ZoneInfo[idx][zOwner], arrCoords[0], 0, strlen(arrCoords[0]), 255);
ZoneInfo[idx][zMinX] = floatstr(arrCoords[1]);
ZoneInfo[idx][zMinY] = floatstr(arrCoords[2]);
ZoneInfo[idx][zMaxX] = floatstr(arrCoords[3]);
ZoneInfo[idx][zMaxY] = floatstr(arrCoords[4]);
ZoneInfo[idx][zTeam] = strval(arrCoords[5]);
printf("[%d] Team: %d | Leader: %s",idx,ZoneInfo[idx][zTeam],ZoneInfo[idx][zOwner]);
idx++;
}
fclose(file);
}
return 1;
}
None|0.000000|0.000000|0.000000|0.000000|0
None|2317.774414|-1473.314086|2405.774414|-1257.314086|9
None|2404.928710|-1473.839965|2484.928710|-1257.839965|8
None|1878.816162|-1357.516235|1974.816162|-1141.516235|7
None|1975.273681|-1357.544799|2071.273681|-1141.544799|6
None|2215.062500|-1876.189208|2415.062500|-1780.189208|7
None|2215.062500|-1976.052856|2415.062500|-1872.052856|6
None|1954.030517|-2123.559326|2154.030517|-2051.559326|9
None|1954.030517|-2053.793457|2154.030517|-1981.793334|8


