SA-MP Forums Archive
Smaller problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Smaller problem (/showthread.php?tid=650481)



Smaller problem - StR_MaRy - 28.02.2018

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;
}



Re: Smaller problem - kevann - 28.02.2018

why u need it smaller?


Re: Smaller problem - StR_MaRy - 28.02.2018

Why not ... ?