Jump to content
  • 0

Problema Members


DraveN

Question

Nick: DraveN

Problema: Am adaugat  un AFK system si am incercat in asa fel la comenzile gen: /helpers /admins /whores /wanted sa apara jucatorii afk, toate merg pana aici.Am incercat sa adaug si pentru comanda /members dar fara succes, nici o eroare sau warnings, pur si simplu si cand este jucatorul AFK nu apare in dreptul lui, nu inteleg ce poate sa fie gresit din comanda asta.

Erori / warnings: nu am

Lini/script: [pawn]    if(strcmp(cmd,"/members",true)==0)

      {

          if(IsPlayerConnected(playerid))

          {

              new teamnumber,mon[64],count = 0;

              if (PlayerInfo[playerid][pLeader] != 0) teamnumber = PlayerInfo[playerid][pLeader];

              else if (PlayerInfo[playerid][pMember] != 0) teamnumber = PlayerInfo[playerid][pMember];

              else

              {

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

                  return 1;

              }

              SendClientMessage(playerid, COLOR_WHITE, "|_____ Members Online _____|");

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

              {

                  if (IsPlayerConnected(i))

                  {

                      if(AFKCheck[playerid] > 0)

      {

      GetPlayerName(i, sendername, sizeof(sendername));

      //GetPlayerName(i, giveplayer, sizeof(giveplayer));

                      if (PlayerInfo[pLeader] == teamnumber)

    {

                          format(string, sizeof(string), "» {F81414}Leader: %s {D580FE}- AFK -",sendername);

                          count++;

                      }

                      else if (PlayerInfo[pMember] == teamnumber)

    {

                          format(string, sizeof(string), "» {00C0FF}Rank %d: %s - Faction Warnings [%d/3] - Job %d - Mute [%d] {D580FE}- AFK -", PlayerInfo[pRank], sendername, PlayerInfo[pFACWarns], PlayerInfo[pJob], PlayerInfo[pMuteTime]);

                          count++;

                        }

      }

      else

    {

      GetPlayerName(i, sendername, sizeof(sendername));

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

                      if (PlayerInfo[pLeader] == teamnumber)

    {

                          format(string, sizeof(string), "» {F81414}Leader: %s",sendername);

                          count++;

                      }

                      else if (PlayerInfo[pMember] == teamnumber)

    {

                          format(string, sizeof(string), "» {00C0FF}Rank %d: %s - Faction Warnings [%d/3] - Job %d - Mute [%d]", PlayerInfo[pRank], sendername, PlayerInfo[pFACWarns], PlayerInfo[pJob], PlayerInfo[pMuteTime]);

                          count++;

                      }

                      if (strlen(string) > 1) SendClientMessage(playerid, COLOR_GRAD2, string);

                      }

                  }

              }

              format(mon,sizeof(mon),"» Now are %d members online.",count);

              SendClientMessage(playerid,-1,mon);

          }

          return 1;

      }[/pawn]

Ai incercat sa rezolvi singur ?: da dar nu mi-a iesit , comanda merge dar cand dau /members si un membru e afk apare normal nu cum am facut eu.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Topic inchis , 48h+ fara reply/up.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

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.