Jump to content

Cum Trec Comanda /members In Dialog


Alexander14

Recommended Posts

Descriere tutorial: Salut as dorii sa trec aceasta comanda in dialog daca stie cineva va rog +1 :D

[pawn]CMD:members(playerid, params[])

{

new teamnumber, string[999];

  if(IsPlayerConnected(playerid))

  {

    if (pInfo[playerid][Leader] != 0) teamnumber = pInfo[playerid][Leader];

    else

if (pInfo[playerid] != 0) teamnumber = pInfo[playerid];

  else

  {

      SendClientMessage(playerid, COLOR_RED, "You are not a member of a team!");

        return 1;

      }

      SendClientMessage(playerid, COLOR_RED, "* Membri Online *");

        for(new i = 0; i < MAX_PLAYERS; i++)

        {

        if (IsPlayerConnected(i))

  {

      GetPlayerName(i, SenderName, sizeof(SenderName));

      format(string, sizeof(string), "");

  if (pInfo[Leader] == teamnumber) format(string, sizeof(string), "Leader - %s ",SenderName);

  else

  if (pInfo == teamnumber) format(string, sizeof(string), " %s - Rank : %d",SenderName, pInfo[Rank]);

  if (strlen(string) > 1) SendClientMessage(playerid, 0xF5DEB3AA, string);

}

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.