SA-MP Forums Archive
Editing a faction type - 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: Editing a faction type (/showthread.php?tid=381734)



Editing a faction type - RLGaming - 30.09.2012

Код:
CMD:editfactype(playerid, params[])
{
	new facnumber = MAX_GROUPS, iFac, factype, string[64];
	if(PlayerInfo[playerid][pAdmin] >= 5)
	{
	if(sscanf(params, "di", facnumber, factype)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /editfacname [playerid] [1 - 4 [/factypes]]");

	if(arrFaction[iFac][g_iFactionType])
	{
	format(string, sizeof(string), "You have updated faction ID %D to faction type %i.", facnumber, factype);
	SendClientMessageEx(playerid, COLOR_WHITE, string);
	arrFaction[iFac][g_iFactionType] = factype;
	}
	}
	return 1;
}
The command ^

Basically, I have everything defined etc, no warnings or errors - But, im so confused with this, as in how can I set the factionID I enter for the CMD and then set it to a type I chose, IE a number(1 - 4)

So how can i make it so it updates that ID and saves?~

+rep