24.10.2014, 11:54
PHP код:
LoadDutyMenus()
{
for(new i = 1; i < MAX_DUTYMENUS; i++)
{
new command[17];
new file[100];
new var[32];
format(file, sizeof(file), "DutyMenus/%d.ini", i);
if(fexist(file) && INI_Open(file))
{
INI_ReadString(command, "DutyMenuCommand");
DutyMenuStatistics[i][DutyMenuX] = INI_ReadFloat("DutyMenuX");
DutyMenuStatistics[i][DutyMenuY] = INI_ReadFloat("DutyMenuY");
DutyMenuStatistics[i][DutyMenuZ] = INI_ReadFloat("DutyMenuZ");
DutyMenuStatistics[i][DutyMenuFaction] = INI_ReadInt("DutyMenuFaction");
for(new g = 0; g < 47; g++)
{
format(var, sizeof(var), "DutyMenuGun%d", g);
DutyMenuStatistics[i][DutyMenuGuns][g] = INI_ReadInt(var);
format(var, sizeof(var), "DutyMenuGunRank%d", g);
DutyMenuStatistics[i][DutyMenuGunRank][g] = INI_ReadInt(var);
}
DutyMenuStatistics[i][DutyMenuMask] = INI_ReadInt("DutyMenuMask");
DutyMenuStatistics[i][DutyMenuMaskRank] = INI_ReadInt("DutyMenuMaskRank");
DutyMenuStatistics[i][DutyMenuVirtual] = INI_ReadInt("DutyMenuVirtual");
DutyMenuStatistics[i][DutyMenuPickup] = CreateDynamicPickup(1239, 23, DutyMenuStatistics[i][DutyMenuX], DutyMenuStatistics[i][DutyMenuY], DutyMenuStatistics[i][DutyMenuZ], DutyMenuStatistics[i][DutyMenuVirtual]);
strmid(DutyMenuStatistics[i][DutyMenuCommand], command, 0, strlen(command), 255);
DutyMenuIDTaken[i] = 1;
INI_Close();
}
}
return 1;
}