y_ini not loading file.
#3

Make a loop with Foreach or use..

NORMAL LOOP
pawn Код:
for(new i = 0; i < MAX_FACTIONS; i++)
{
    // LOADING HERE
}
FOREACH LOOP
pawn Код:
foreach (new i : MAX_FACTIONS)
{
    // LOADING HERE
}
EXAMPLE LOOP ONGAMEMODEINIT
pawn Код:
for(new idx = 1; idx < sizeof(BusinessInfo); idx++)//Creates a loop, that goes through all of the businesses.
    {
        format(str, sizeof(str), BPATH, idx);//formats the file path, with the biz ID
        INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );//This is very hard to explain, but it basically loads the info from the file(More in ****** y_ini tutorial.)
        BusinessInfo[idx][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]); //Creates a pickup at the business entrance.
        BusinessInfo[idx][bInsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]); //Creates a pickup at the exit(Inside the interior)
    }
EDIT: Does it reset when you connect?
Reply


Messages In This Thread
y_ini not loading file. - by Facerafter - 07.06.2013, 10:30
Re: y_ini not loading file. - by gtakillerIV - 07.06.2013, 12:44
Re: y_ini not loading file. - by Tingesport - 07.06.2013, 12:50
Re: y_ini not loading file. - by Facerafter - 07.06.2013, 13:07
Re: y_ini not loading file. - by Facerafter - 07.06.2013, 17:55
Re: y_ini not loading file. - by gtakillerIV - 07.06.2013, 19:18
Re: y_ini not loading file. - by Facerafter - 07.06.2013, 23:40
Re: y_ini not loading file. - by Facerafter - 08.06.2013, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)