How to make command /leaders
#3

What code u want?

EDIT:
This is /makeleader command:
Код:
CMD:postavilidera(playerid, params[])
{
	static
		userid,
		id;

    if (PlayerData[playerid][pAdmin] < 5)
	    return SendErrorMessage(playerid, "Niste ovlasteni.");

	if (sscanf(params, "ud", userid, id))
	    return SendSyntaxMessage(playerid, "/postavilidera [playerid/ime] [organizacija id] (Koristi -1 da skines lidera)");

	if (userid == INVALID_PLAYER_ID)
	    return SendErrorMessage(playerid, "Netacan ID igraca.");

    if ((id < -1 || id >= MAX_FACTIONS) || (id != -1 && !FactionData[id][factionExists]))
	    return SendErrorMessage(playerid, "Unijeli ste netacan ID organizacije.");

	if (id == -1)
	{
	    ResetFaction(userid);

	    SendServerMessage(playerid, "Skinuli ste lidera igracu %s.", ReturnName(userid, 0));
    	SendServerMessage(userid, "Administrator %s vam je skinuo lidera.", ReturnName(playerid, 0));
	}
	else
	{
		SetFaction(userid, id);
		PlayerData[userid][pFactionRank] = FactionData[id][factionRanks];

		SendServerMessage(playerid, "Postavili ste igracu %s lidera organizacije \"%s\".", ReturnName(userid, 0), FactionData[id][factionName]);
    	SendServerMessage(userid, "Administrator %s vas je postavio za lidera organizacije \"%s\".", ReturnName(playerid, 0), FactionData[id][factionName]);
	}
    return 1;
}
This is faction data:
Код:
enum factionData {
	factionID,
	factionExists,
	factionName[32],
	factionColor,
	factionType,
	factionRanks,
	Float:factionLockerPos[3],
	factionLockerInt,
	factionLockerWorld,
	factionSkins[8],
	factionWeapons[10],
	factionAmmo[10],
	Text3D:factionText3D,
	factionPickup,
	Float:SpawnX,
	Float:SpawnY,
	Float:SpawnZ,
	SpawnInterior,
	SpawnVW
};
Reply


Messages In This Thread
How to make command /leaders - by ervinmasic - 12.12.2015, 14:34
Re: How to make command /leaders - by ATGOggy - 12.12.2015, 15:06
Re: How to make command /leaders - by ervinmasic - 12.12.2015, 15:10
Re: How to make command /leaders - by saffierr - 12.12.2015, 23:12
Re: How to make command /leaders - by ervinmasic - 13.12.2015, 08:24
Re: How to make command /leaders - by Denying - 13.12.2015, 14:53
Re: How to make command /leaders - by ervinmasic - 14.12.2015, 09:37
Re: How to make command /leaders - by Elegy - 14.12.2015, 09:49
Re: How to make command /leaders - by Assassin007 - 14.12.2015, 11:12
Re: How to make command /leaders - by PrO.GameR - 14.12.2015, 11:17

Forum Jump:


Users browsing this thread: 3 Guest(s)