Problem with gangzone
#1

Hi, I have a problem with GANGZONE.
when the player takes a territory, he marks on the map, but when disconnects and reconnects it does not see the GANGZONE have win on the map

when you capture a territory, it is displayed in the map, but when you relog, we see Nothing

Код:
	if(PlayerStats[playerid][GangID] != -1) SetPlayerColor(playerid, GangInfo[PlayerStats[playerid][GangID]][Color]); 
   	new ZoneFile[255];
   	for(new zoneid = 1; zoneid < MAX_ZONES; zoneid++)
	{
	    format(ZoneFile,sizeof(ZoneFile),GangZoneFile, zoneid);
		if(dini_Exists(ZoneFile))
		{
		   	if(ZoneInfo[zoneid][OfGangID] == -1)
		   	{
				GangZoneShowForPlayer(playerid, ZoneInfo[zoneid][GZID], GCOLOR_GRIGIO);
			}
			else
			{
			    GangZoneShowForPlayer(playerid, ZoneInfo[zoneid][GZID], GangInfo[ZoneInfo[zoneid][OfGangID]][Color]);
			}
   	    }
	}
Reply
#2

Just Load it Because GangZone still have value (you said relog)
if you want to save just save when take territory or some another condition

Example :

PHP код:
if(PlayerStats[playerid][GangID] != -1SetPlayerColor(playeridGangInfo[PlayerStats[playerid][GangID]][Color]); 
              for(new 
zoneid 1zoneid MAX_ZONESzoneid++)
    {
                       if(
ZoneInfo[zoneid][OfGangID] == -1)
               {
                
GangZoneShowForPlayer(playeridZoneInfo[zoneid][GZID], GCOLOR_GRIGIO);
            }
            else
            {
                
GangZoneShowForPlayer(playeridZoneInfo[zoneid][GZID], GangInfo[ZoneInfo[zoneid][OfGangID]][Color]);
            }
           
    } 
and you load gangzone when ongamemodeinit or filterscriptinit

Maybe Color Disappear Try to write some Stock get color out

IE :
PHP код:

stock GetZoneColor
(GangID)
{
            switch(
GangInfo[GangID][Color]
           {
             case 
: return GCOLOR_BLAHBLAH// case zoneid == 1
             
case : return GANGZONE_COLOR_BLAHBLAH// case zoneid ==2
          
}

and put in
pawn Код:
GangZoneShowForPlayer(playerid, ZoneInfo[zoneid][GZID], GetZoneColor(zoneid));
Good Luck
Reply
#3

thanks,
my problem is already solved , but when the server restarts, the GANZONE still exists but does not appear
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)