Need some help
#6

Yes, it does exists

pawn Код:
// This is my define for Gang_File

#define Gang_File "Gangs/%d.ini"

new TotalGangs;

public OnGameModeInit()
{
    if(!DOF_FileExists(CFG_File))
    {
        DOF_CreateFile(CFG_File);
        DOF_SetInt(CFG_File, "Gangs", 0);
        print("CFG File created");
    }
    else
    {
        TotalGangs = DOF_GetInt(CFG_File, "Gangs");
        for(new i = 0; i <= TotalGangs; i++)
        {
            GangInfo[i][Gangs] = i;
        }
        printf("CFG File loaded. %d gangs loaded", TotalGangs);
    }
    DOF_SaveFile();
    return 1;
}
There's the TotalGangs variable which also works, so yeah, maybe something wrong with the code I provided in the first post?
Reply


Messages In This Thread
Need some help - by Cowboy - 20.12.2011, 16:40
Re: Need some help - by Cowboy - 21.12.2011, 11:10
Re: Need some help - by Ash. - 21.12.2011, 11:35
Re: Need some help - by Cowboy - 21.12.2011, 18:46
Re: Need some help - by Ash. - 21.12.2011, 20:09
Re: Need some help - by Cowboy - 22.12.2011, 13:43
Re: Need some help - by Cowboy - 22.12.2011, 20:30
Re: Need some help - by skaTim - 22.12.2011, 21:00
Re: Need some help - by Cowboy - 22.12.2011, 21:02
Re: Need some help - by Ash. - 22.12.2011, 21:09

Forum Jump:


Users browsing this thread: 1 Guest(s)