Trazim komandu /makeadmin

Započeo ₴₳₥ł, Mart 07, 2018, 16:28:08 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Pozz jel ima neko komandu /makeadmin al da je sa DIALOGOM razumijete da iskoci onaj dialog kad ti neko seta Admina po mogucnosti da je slicna onima ko sa Zenolo/Ath/BE
Hvalaaa ! <3
✘ D E S I G N E R ✘
Los East Community Dev.


Izvuci jednostavno iz nekog moda,ne znam kako si ti to postavio za pAdmin i ostalo.
Respect to: Fantom,Muma,Markoni.
-------------------- Moji Radovi -------------------------
-------------------- Gamemodes ------------------------
Castro RolePlay: http://balkan-samp.com/forum/index.php?topic=119369.0
Black Expensive x2.2: http://balkan-samp.com/forum/index.php?topic=120053.0
------------------- FilterScripts ------------------------
Bunny Hop: http://balkan-samp.com/forum/index.php?topic=120437.0
Bank System: http://balkan-samp.com/forum/index.php?topic=119244.0

[pawn]YCMD:makeadmin(playerid,params[],help)
{
   #pragma unused help
   if(UlogovanIgrac[playerid] == 0 || PI[playerid][pReg] == 0) return Error(playerid, "Nisi ulogovan/a ili nisi registrovan/a!");
    if(PI[playerid][pabs] < 1 && ACCmd[playerid] == 1) return Error(playerid, "Komande mozete koristiti svake 2 sekunde!");
   CmdProtect(playerid);
   CmdLog(playerid, 53);
   if(UlogovanIgrac[playerid] == 0) return Error(playerid, "Nisi ulogovan!");
   if(IsPlayerConnected(playerid))
   {
       if(!strcmp(GetNameEx(playerid), Owner_1, true) || !strcmp(GetNameEx(playerid), Owner_2, true) || !strcmp(GetNameEx(playerid), Director_1, true) || !strcmp(GetNameEx(playerid), Director_2, true) || !strcmp(GetNameEx(playerid), Director_3, true) || !strcmp(GetNameEx(playerid), Director_4, true) || !strcmp(GetNameEx(playerid), Director_5, true) || !strcmp(GetNameEx(playerid), Director_6, true))
      {
         new id, lvl, slot;
         if(IsPlayerAdmin(playerid) || PI[playerid][pabs] >= 6)
         {
            if(sscanf(params, "uii", id, lvl, slot)) return Cmd(playerid, "/makeadmin (playerid) (level) (slot 1-20 (0 skidanje))");
            else if(id == IPI) return Error(playerid, "Pogresan ID!");
            else if(slot < 0 || slot > 30) return Error(playerid, "Slot ne moze biti manji od 1 ili veci od 30!");
            else if(slot < 1 && lvl > 0) return Error(playerid, "Slot ne moze biti manji od 1 ili veci od 30!");
            else if(lvl < 0 || lvl > 6) return Error(playerid, "Ne moze vise od 6 ili manje od 0!");
            else
            {
                if(lvl > 0)
                {
                    //
                   new ldst[128];
                   format(ldst,128,"BExtazy/admini/%d.txt",slot);
                   new text[80];
                    format(text,64,"%s",GetNameEx(id));
                    new File:log;
                    log = fopen(ldst, io_write);
                    fwrite(log, text);
                    fclose(log);
                    //
                  new string[128];
                  SetPlayerSkin(id, 294);
                  PI[id][pSkin] = 294;
                  PI[id][pabs] = lvl;
                  new kod = random(500)+99;
                  PI[id][pCode] = kod;
                  PI[id][pASlot] = slot;
                  PI[id][pRacunar] = 1;
                  PI[id][pMember] = 0;
                  PI[id][pIJob] = 0;
                  PI[id][pUgovor] = 0;
                  PI[id][pSuspend] = 0;
                  PI[id][pSwat] = 0;
                  PI[id][pLeader] = 0;
                  PI[id][pRank] = 0;
                  BubblePermission1(id);
                  printf("AdmCmd: %s je promovisan od strane %s na level %d ABS-a.", GetName(id), GetName(playerid), lvl, slot);
                  format(string, sizeof(string), ""COL_BE"BE: {FFFFFF}Promovisani ste na Admin level %d od strane ABS-a %s, vas kod je: %d, a slot: %d.", lvl, GetName(playerid), kod, slot);
                  SCM(id, -1, string);
                  format(string, sizeof(string), ""COL_BE"BE: {FFFFFF}Promovisali ste gradjanina %s na Admin level %d, slot: %d.", GetName(id),lvl, slot);
                  SCM(playerid, -1, string);
                  format(string,sizeof(string), "{FBE204}[{F81414}*{FBE204}] BE-AC // Admin %s je postavio gradjaninu %s Admin level %d, slot: %d.", GetName(playerid), GetName(id), lvl, slot);
                  PAdm(ZUTA, string, 1);
                  new str[128];
                  format(str,128,"%s je dao gradjaninu %s ABS-a level %d, slot: %d.",GetName(playerid),GetName(id),lvl, slot);
                  MakeLog(str);
                  new stris[500];
                  format(stris,500,"{FFFFFF}Cestitamo vam, postali ste Admin na Balkan Extazy RolePlay serveru!\nAdmin level %d vam je dao owner %s.\n\nVAZNO:\nOvaj kod sto ce vam dole biti napisan, morate napisati na neki papiric,\njer ce se on traziti svaki put kada se logujete!\nTakodje taj kod ce vam biti poslan na e-mail.\nKOD: %d",lvl,GetName(playerid),kod);
                  SPD(id, 19536, DSM, ""COL_BE"Admin", stris, "OK", "");
                  //SetPVarInt(id, "Izbegavanje", 1);
                  new strki[128];
                  format(strki, 128, "%s", PI[id][pMail]);
                  new stringmm[300];
                  format(stringmm,300,"Vas Admin Code je: %d\n- Balkan Extazy Admin Team.",kod);
                  SendMail(strki, "[email protected]", "Balkan Extazy RolePlay", "Balkan Extazy - Admin Code", stringmm);
                  SaveAccount(id);
               }
               else if(lvl < 1)
               {
                   if(PI[id][pabs] > 0)
                  {
                      new ldst[128];
                      format(ldst,128,"BExtazy/admini/%d.txt",PI[id][pASlot]);
                      new text[80];
                        format(text,64,"Niko");
                        new File:log;
                         log = fopen(ldst, io_write);
                       fwrite(log, text);
                         fclose(log);
                  }
                   new string[128];
                   PI[id][pabs] = lvl;
                   SetPlayerSkin(id, 59);
                   PI[id][pSkin] = 59;
                   PI[id][pASlot] = 0;
                   PI[id][pCode] = 0;
                   PI[id][pRacunar] = 0;
                   SCMF(id, -1, ""COL_BE"BE: {FFFFFF}Skinuta vam je pozicija ABS-a od strane %s.",GetName(playerid));
                   format(string,sizeof(string), "{FBE204}[{F81414}*{FBE204}] BE-AC // Owner %s je skinuo ABS-a gradjaninu %s.", GetName(playerid), GetName(id));
                  PAdm(ZUTA, string, 1);
                  //SetPVarInt(id, "Izbegavanje", 0);
                   SaveAccount(id);
                   SetPlayerSpecialAction(id, SPECIAL_ACTION_NONE);
                   BubblePermission1(id);
               }
            }
         }
      }
   }
   return true;
}[/pawn]

✘ D E S I G N E R ✘
Los East Community Dev.