Jump to content
  • 0

problema /respawn


KrsGabriel

Question

Ajutati-ma am o problema un admin de lvl mai mic decat owneru nu poate da /respawn la un player fara sa dea /aod ce trebuie sa scot din gm ca am la mai multe comenzi aceasi problema ajutati-ma va rog daca se poate

//-----------------------------------[Respawn]----------------------------------
    if(strcmp(cmd, "/respawn", true) == 0) //By KrsGabriel
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /respawn [playerid/PartOfName]");
                return 1;
            }
            new playa;
              playa = ReturnUser(tmp);
              if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
            {
                if(IsPlayerConnected(playa))
                {
                    if(playa != INVALID_PLAYER_ID)
                    {
                        if(PlayerInfo[playerid][pAdmin] < 1339)
                        {
                            if(playa == playerid){ SendClientMessage(playerid, COLOR_WHITE,"[Server]: You can respawn yourself, stupid."); return 1; }
                        }
                        if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin])
                        {
                            SendClientMessage(playerid, COLOR_GRAD1,"[Server]: Nu poti teleporta admini mai mari in grad ca tine !");
                            return 1;
                        }
                        if(WantedLevel[playa] >= 1)
                         {
                            SendClientMessage(playerid,COLOR_GREY,"[Server]: Acest player are wanted !");
                            return 1;
                         }
                        //if(SpawnChange[playerid])
                        {
                            GetPlayerName(playa, giveplayer, sizeof(giveplayer));
                            SpawnPlayer(playa);
                            SetPlayerArmour(playa, 0.0);
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            new arank[64];
                            if(PlayerInfo[playerid][pAdmin] >= 1) { arank = "Admin"; }
                            else if(PlayerInfo[playerid][pHelper] >= 1) { arank = "HELPER"; }
                            else { arank = "Virus"; }
                            format(string, sizeof(string), "[Server]: Ai primit respawn de la [%s] %s.", arank,sendername);
                            SendClientMessage(playa, COLOR__CYAN, string);
                            format(string, 128, "[%s]: %s has respawned the player %s.", arank,sendername, giveplayer);
                            SendHelperMessage(COLOR_YELLOW, string);
                            new y, m, d;
                            new h,mi,s;
                            getdate(y,m,d);
                            gettime(h,mi,s);
                            format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s has respawned the player %s.",d,m,y,h,mi,s,sendername,giveplayer);
                            AdminActivity(string);
                            return 1;
            }
                    }
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "[Server]: Nu ai voie sa folosesti aceasta comanda!");
            }
        }
        return 1;
    }
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
//-----------------------------------[Respawn]----------------------------------
  if(strcmp(cmd, "/respawn", true) == 0) //By KrsGabriel
  {
    if(IsPlayerConnected(playerid))
    {
      tmp = strtok(cmdtext, idx);
      if(!strlen(tmp))
      {
        SendClientMessage(playerid, COLOR_GRAD2, "{00A1FF}USAGE{FFFFFF}: /respawn [playerid/PartOfName]");
        return 1;
      }
      new playa;
      playa = ReturnUser(tmp);
      if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 2)
      {
        if(IsPlayerConnected(playa))
        {
          if(playa != INVALID_PLAYER_ID)
          {
              if(PlayerInfo[playerid][pAdmin] < 1)
              {
                if(playa == playerid){ SendClientMessage(playerid, COLOR_WHITE,"[Server]: You can respawn yourself, stupid."); return 1; }
            }
            if(PlayerInfo[playa][pAdmin] > PlayerInfo[playerid][pAdmin])
            {
              SendClientMessage(playerid, COLOR_GRAD1,"[Server]: Nu poti teleporta admini mai mari in grad ca tine !");
              return 1;
            }
            if(WantedLevel[playa] >= 1)
             {
              SendClientMessage(playerid,COLOR_GREY,"[Server]: Acest player are wanted !");
              return 1;
             }
            //if(SpawnChange[playerid])
            {
              GetPlayerName(playa, giveplayer, sizeof(giveplayer));
              SpawnPlayer(playa);
              SetPlayerArmour(playa, 0.0);
              GetPlayerName(playerid, sendername, sizeof(sendername));
              new arank[64];
              if(PlayerInfo[playerid][pAdmin] >= 1) { arank = "Admin"; }
              else if(PlayerInfo[playerid][pHelper] >= 1) { arank = "HELPER"; }
              else { arank = "Virus"; }
              format(string, sizeof(string), "[Server]: Ai primit respawn de la [%s] %s.", arank,sendername);
              SendClientMessage(playa, COLOR__CYAN, string);
              format(string, 128, "[%s]: %s has respawned the player %s.", arank,sendername, giveplayer);
              SendHelperMessage(COLOR_YELLOW, string);
              new y, m, d;
              new h,mi,s;
              getdate(y,m,d);
              gettime(h,mi,s);
              format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s has respawned the player %s.",d,m,y,h,mi,s,sendername,giveplayer);
              AdminActivity(string);
              return 1;
          }
          }
        }
      }
      else
      {
        SendClientMessage(playerid, COLOR_GRAD1, "[Server]: Nu ai voie sa folosesti aceasta comanda!");
      }
    }
    return 1;
  }

Y!M: menyx.official

Skype: menyx.official

 

 

Inainte de a critica o persoana indiferent de etnie/varsta/inteligenta ei uita-te la tine si nu uita ca toti suntem Oameni si ca nu are sens sa incerci sa pari diferit!Daca esti mai prost/destept decat cel scos/aflat in discutie incearca sa nu faci pe "MR. Inteligent" TACI si FACI!

Respecta membrii acestei comunitati daca ai pretentia sa fi respectat si tratat(a) ca pe o fiinta umana!

 

Nu fac nimic remarcabil, dar ceea ce fac este esenţial.•

 

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.