Just a simple question
#6

Код:
#define MAX_FACTIONS      10 // at defines

stock GetUnusedFaction()
{
	new hf[64];
	for(new h=0; h<=MAX_FACTIONS; h++)
	{
	    format(hf,sizeof(hf),"The file you saving factions",h);
	    if(dini_Exists(hf)) continue;
	    return h;
	}
	return -1;
}
and also remove FacSlots from finfo.

The codes that are up here will get the unused faction slot and also reads if the max_factions has been reached.
Reply


Messages In This Thread
Just a simple question - by StrikerZ - 26.10.2016, 15:49
Re: Just a simple question - by ThatFag - 26.10.2016, 16:06
Re: Just a simple question - by StrikerZ - 26.10.2016, 16:11
Re: Just a simple question - by ThatFag - 26.10.2016, 16:13
Re: Just a simple question - by StrikerZ - 26.10.2016, 16:15
Re: Just a simple question - by ThatFag - 26.10.2016, 16:20
Re: Just a simple question - by StrikerZ - 27.10.2016, 10:00
Re: Just a simple question - by StrikerZ - 27.10.2016, 15:20
Re: Just a simple question - by Maheerali - 28.10.2016, 08:51

Forum Jump:


Users browsing this thread: 3 Guest(s)