If Player Is a Police Leader Show Nick
#1

How can i make that if player is a leader lets say leader : Tom Then player types /leaders Police Leader : Tom
Reply
#2

Quote:
Originally Posted by wordas
How can i make that if player is a leader lets say leader : Tom Then player types /leaders Police Leader : Tom
how does your cop system look like what does the leader has that normal people dont has than you dont have to change that all the time.
Reply
#3

It was just an exaple lets say:
Quote:

if(PlayerInfo[playerid][pLeader] == 1)

]
i think i can do most of the command but how to like if player pLeader 1 Show player nick?
Reply
#4

Quote:
Originally Posted by wordas
It was just an exaple lets say:
Quote:

if(PlayerInfo[playerid][pLeader] == 1)

]
i think i can do most of the command but how to like if player pLeader 1 Show player nick?
pawn Код:
if (strcmp(cmd, "/leaders", true) == 0) // The old one
    {
        SendClientMessage(playerid, COLOR_GRAD1, "Leaders Online:");
        for(new i = 0; i <= MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) == 1 && PlayerInfo[playerid][pLeader] == 1)
            {
                GetPlayerName(i, sendername, sizeof(sendername));
                format(string, 256, "Leader: %s", sendername);
                SendClientMessage(playerid, COLOR_GRAD2, string);
            }
        }
        return 1;
    }
Reply
#5

Or if you want it to tell them if no leaders are online then
pawn Код:
if(strcmp(cmd, "/leaders", true) == 0)
    {
      SendClientMessage(playerid,COLOR_GRAY, "Leaders Online");
      new LeadersOnline;
      for(new i; i < MAX_PLAYERS; i++)
      {
        if(IsPlayerConnected(i))
        {
          if(PlayerInfo[i][pLeader])// w/e defines them as a leader, this is an example
                {
            new LeaderName[MAX_PLAYER_NAME];
            GetPlayerName(i, LeaderName, sizeof(LeaderName));
                    format(string, sizeof(string), "* Leader: %s", LeaderName);
            SendClientMessage(playerid, COLOR_YELLOW, string);
                    LeadersOnline++;
                    return 1;
                }
            }
        }
        if(LeadersOnline == 0)
        {
          SendClientMessage(playerid, COLOR_YELLOW, "* None");
        }
        return 1;
}
Reply
#6

Thanks Guys
Reply
#7

Код:
	
if(strcmp(cmd, "/leaders", true) == 0)
	{
	  SendClientMessage(playerid,COLOR_GRAY, "Leaders Online");
	  new LeadersOnline;
	  for(new i; i < MAX_PLAYERS; i++)
	  {
	    if(IsPlayerConnected(i))
	    {
	      if(PlayerInfo[i][pLeader])// w/e defines them as a leader, this is an example
				{
	        new LeaderName[MAX_PLAYER_NAME];
	        GetPlayerName(i, LeaderName, sizeof(LeaderName));
					format(string, sizeof(string), "* Leader: %s", LeaderName);
	        SendClientMessage(playerid, COLOR_YELLOW, string);
					LeadersOnline++;
					return 1;
				}
			}
		}
		if(LeadersOnline == 0)
		{
		  SendClientMessage(playerid, COLOR_YELLOW, "* None");
		}
		return 1;
}
How do i make, if i have LA COSA NOSTRA faction and /members will shows who is LA COSA NOSTRA members onlines ?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)