07.06.2013, 12:50
Make a loop with Foreach or use..
NORMAL LOOP
FOREACH LOOP
EXAMPLE LOOP ONGAMEMODEINIT
EDIT: Does it reset when you connect?
NORMAL LOOP
pawn Код:
for(new i = 0; i < MAX_FACTIONS; i++)
{
// LOADING HERE
}
pawn Код:
foreach (new i : MAX_FACTIONS)
{
// LOADING HERE
}
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)
}