Not showing the leader names
#5

Quote:
Originally Posted by AlexMSK
Посмотреть сообщение
Код:
//at playerinfo enum add
pFacleader1[MAX_PLAYER_NAME],
pFacleader2[MAX_PLAYER_NAME],
pFacleader3[MAX_PLAYER_NAME],
pFacleader4[MAX_PLAYER_NAME],



CMD:setleader(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 4)
	{
	    new targetid, facid;
	    if(sscanf(params,"ui",targetid, facid)) return SendClientMessage(playerid, COLOR_RED,"/setleader [id][Faction id]");
	    if(targetid != INVALID_PLAYER_ID)
	    {
	        PlayerInfo[targetid][pFaction] = facid; 
	        PlayerInfo[targetid][pFacrank] = 10;
	        if(facid == 1)
	        {
				SendClientMessage(targetid,COLOR_CYAN,"You have been made the leader of the Las Venturas PD");
				PlayerInfo[playerid][pFacleader1] = 1;

			}
			if(facid == 2)
			{
			    SendClientMessage(targetid,COLOR_CYAN,"You have been made the leader of The Santino Family");
			    PlayerInfo[playerid][pFacleader2] = 1;
			}
			if(facid == 3)
			{
			    SendClientMessage(targetid,COLOR_CYAN,"You've been made the leader of The Manusco Crew");
			    PlayerInfo[playerid][pFacleader3] = 1;
			}
			if(facid == 4)
			{
			    SendClientMessage(targetid,COLOR_CYAN,"You've been made the leader of Back Alley Crips");
			    PlayerInfo[playerid][pFacleader4] = 1;
			}
	    }
	}
	else
	{
	    SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
	}
	return 1;
}

CMD:factions(playerid,params[])
{
	if(IsPlayerConnected(playerid))
	{
	    new string[185], stats[1024];
	    format(string,sizeof(string),"*Las Venturas Police Department[ID1] || Leader: %s \n*The Santino Family[ID2] || Leader: %s \n*The Manusco Crew[ID3] || Leader: %s \n*Back Alley Crips[ID4]  Leader: %s",PlayerInfo[playerid][pFacleader1] ,PlayerInfo[playerid][pFacleader2] ,PlayerInfo[playerid][pFacleader3] ,PlayerInfo[playerid][pFacleader4]);
	    format(stats, sizeof stats, "%s", string);
	    ShowPlayerDialog(playerid,FACTIONS,DIALOG_STYLE_MSGBOX," Factions:",stats,"Ok","");
	}
	return 1;
}
Will this code actually save the leader?
Reply


Messages In This Thread
Not showing the leader names - by Escobabe - 03.10.2017, 23:32
Re: Not showing the leader names - by AlexMSK - 03.10.2017, 23:39
Re: Not showing the leader names - by Escobabe - 03.10.2017, 23:49
Re: Not showing the leader names - by AlexMSK - 04.10.2017, 00:05
Re: Not showing the leader names - by Escobabe - 04.10.2017, 00:14
Re: Not showing the leader names - by Swankeh - 04.10.2017, 00:20
Re: Not showing the leader names - by AlexMSK - 04.10.2017, 00:25
Re: Not showing the leader names - by Escobabe - 04.10.2017, 12:16

Forum Jump:


Users browsing this thread: 1 Guest(s)