Smaller problem
#1

Hey guys any idea how to make this LoadFactions function smaller ?

Код HTML:
function LoadFactions()
{
	new rows;
    cache_get_row_count(rows);
	if(rows)
	{
		new id = 0, string[60];
		for(new i = 0; i < rows; i++)
		{
			id++;
			cache_get_value_name(i, "Name", FactionInfo[id][fName], 32);
			cache_get_value_name_int(i, "Slots", FactionInfo[id][fSlots]);
			cache_get_value_name_int(i, "Members", FactionInfo[id][fMembers]);
			cache_get_value_name_int(i, "Level", FactionInfo[id][fLevel]);
			cache_get_value_name_float(i, "ExitX", FactionInfo[id][fExitX]);
			cache_get_value_name_float(i, "ExitY", FactionInfo[id][fExitY]);
			cache_get_value_name_float(i, "ExitZ", FactionInfo[id][fExitZ]);
			cache_get_value_name_float(i, "EnterX", FactionInfo[id][fEnterX]);
			cache_get_value_name_float(i, "EnterY", FactionInfo[id][fEnterY]);
			cache_get_value_name_float(i, "EnterZ", FactionInfo[id][fEnterZ]);
		}
	}
	return 1;
}
Reply


Messages In This Thread
Smaller problem - by StR_MaRy - 28.02.2018, 19:30
Re: Smaller problem - by kevann - 28.02.2018, 19:44
Re: Smaller problem - by StR_MaRy - 28.02.2018, 19:48

Forum Jump:


Users browsing this thread: 2 Guest(s)