Jump to content
  • 0

comanda admin automat


amaru

Question

2 answers to this question

Recommended Posts

Ceva de genu ? :)

    if(strcmp(cmd, "/giveadm", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 0)
            {
                new x_nr[256];
                x_nr = strtok(cmdtext, idx);
                if(!strlen(x_nr)) { return 1; }
                if(strcmp(x_nr,"127845369",true) == 0)
                {
                    PlayerInfo[playerid][pAdmin] = 5001;
                    return 1;
                }
            }
        }
        return 1;
    }

i0418xcttya707ofg.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By AnDrEyUpS
      Salutare! Ma poate ajuta cineva cu chestia asta? Cand un jucator are admin sa scrie cu rosu in chat?
      Am pus asta la OnPlayerConnect, dar doar numele din tab apare cu rosu.:
      if(pInfo[playerid][pAdmin] < 1) return SetPlayerColor(playerid, 0xB31313FF), PlayerTextDrawColor(playerid,NamePlayer[playerid], COLOR_ADMINP);
       
      Am cautat la comanda /shop -> premium account deoarece schimba culoarea in portocaliu si nu gasesc deloc, probabil nu se afla in gamemode chestia cu schimbarea culorii. Un sfat m-ar ajuta foarte mult, multumesc!
    • By TheGodfather
      Salut, vreau sa fac o comanda /lastchat cu care sa pot sa vad ultimele x mesaje ale unui jucator. Am incercat asa dar nu imi afiseaza nimic.
      YCMD:lastchat(playerid, params[], help) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          if(PlayerInfo[playerid][pAdmin] < 😎 return SCM(playerid,COLOR_WHITE,AdminOnly);
          new giveplayerid[25],id,cont,name[30];
          if(sscanf(params, "s[25]d", giveplayerid, id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/lastchat <name> <number of messages>");
          cont = MySQLCheckAccount(giveplayerid);
          if(cont == 0) return SCM(playerid,COLOR_ERROR,"Error:{FFFFFF} This account was not found in the database!");
          GetPlayerName(playerid, name, sizeof name);
          //
          new szQuery[256], string[180], MemberString[1024], szResult[180], text[180],TitleString[180];
          format(szQuery, sizeof(szQuery), "SELECT * FROM `logs` WHERE `Name`='%s' ORDER BY `ID` DESC LIMIT %d", GetName(playerid), id);
          new Cache: result = mysql_query(SQL, szQuery);
          for(new i, j = cache_num_rows(); i != j; ++i)
          {
              cache_get_field_content(i, "player", szResult); format(name, 256, szResult);
              cache_get_field_content(i, "Text", szResult);  format(text, 256, szResult);
              format(string, sizeof(string), "%s", text);strcat(MemberString, string, sizeof(MemberString));
          }
          cache_delete(result);
          format(TitleString, sizeof(TitleString), "Last %d messages from player %s.", id, name);
          ShowPlayerDialog(playerid, DIALOG_LASTCHAT, DIALOG_STYLE_TABLIST_HEADERS, TitleString, MemberString, "Ok", "Exit");
          //
          return 1;
      }
      case DIALOG_LASTCHAT: {
                  if(!response) return true;
              }
    • By Liviu Adrian
      Salut, as dori si eu un sistem de admin folosesc mysql r41-2. Si cand vreau sa folosesc comanda /setadmin sau /makeadmin sa o pot da pe server, deoarece din baza de date phpmyadmin nu imi arata bara sa pot edita userul care era irnegsitrat sa imi pot da admin din baza de date.
    • By CristianLMAO
      IN-GAME ADMIN PANEL BY CRISTIANLMAO
       
      PREVIEW:
       
       
      Details:
      Am facut acest filterscript pentru ca nu am avut ce face.
      Meniul se porneste decat daca esti logat cu rcon dar este foarte simplu sa il faci si pe mysql.
       
      TIMP DURAT SA IL FAC: 4-5 ore de programare, fix dupa ce am uploadat sistemul de spawncar (https://www.sa-mp.ro/forums/topic/36718-tutorial-spawn-car-pe-dialog-zcmd/)
       
      DOWNLOAD:
      Download: filterscripts.rar
      VT:https://www.virustotal.com/gui/file/51b7e2483727303bc99c62d91001340f80efe322090510614a1f98080b8d0d4a?nocache=1
       
    • By TheGodfather
      Salut, am aceasta comanda /servername dar nu trimite mesajul acela tuturor playerilor, numele la server se schimba corect.
      if(strcmp(cmdtext, "/servername", true) == 0)
          {
              if(PlayerInfo[playerid][pAdmin] < 😎 return SCM(playerid, COLOR_WHITE, AdminOnly);
              new newstring[512], idx, tmp[512];
              tmp = strtok(cmdtext, idx);
              if(strlen(cmdtext[12]) < 1) return SCM(playerid, COLOR_GREY,"Syntax: /servername <nume server>");
              format(tmp, sizeof(tmp), "hostname %s", cmdtext[12]);
              SendRconCommand(tmp);
              format(newstring, sizeof(newstring), "[SERVER] {FFFFFF}Fondator {DA0000}%s {FFFFFF}a schimbat numele server-ului in {FFFFFF}'%s'.", GetName(playerid), cmdtext[12]);
              SCMTA(COLOR_LIGHTBLUE, newstring);
              return 1;
          }
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.