Saving???
#3

Hello!

Can you try this version?
PHP код:
stock SaveGangZones()
{
    new 
File:fHandle,fPATH[45],fLine[256],ZoneIDs;
    
format(fPATH,sizeof fPATH,"%s%s.txt",GANG_ZONE_PATH,GANG_ZONE_FILE);
    
fHandle fopen(fPATH,io_write);
    if(
fexist(fPATH))
    {
        if(
fHandle)
        {
            for(new 
ZoneID;ZoneID MAX_GANG_ZONES;ZoneID ++)
            {
                if(!
strlen(ZoneInfo[ZoneID][ZONE_NAME]))continue;
                
format(fLine,sizeof fLine,"%d,%s,%d,%s,%s,%0.4f,%0.4f,%0.4f,%0.4f\r\n",
                
ZoneInfo[ZoneID][ZONE_ID],ZoneInfo[ZoneID][ZONE_NAME],ZoneInfo[ZoneID][ZONE_OWNER_ID],ZoneInfo[ZoneID][ZONE_OWNER],
                
ZoneInfo[ZoneID][ZONE_COLOR],ZoneInfo[ZoneID][ZONE_POS][MinX],ZoneInfo[ZoneID][ZONE_POS][MinY],ZoneInfo[ZoneID][ZONE_POS][MaxX],
                
ZoneInfo[ZoneID][ZONE_POS][MaxY]);
                
fwrite(fHandle,fLine);
                
ZoneIDs += 1;
            }
            
fclose(fHandle);
            
printf("Number ob gang zones saved: %i",ZoneIDs);
        }
    }
    return 
1;

- Mencent
Reply


Messages In This Thread
Saving??? - by bgedition - 16.06.2015, 03:42
Re: Saving??? - by bgedition - 16.06.2015, 11:45
AW: Saving??? - by Mencent - 16.06.2015, 13:47
Re: Saving??? - by bgedition - 16.06.2015, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)