Pomoc hitno u vezi Old Europe moda

Započeo Todor Script, Septembar 05, 2018, 14:37:47 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Citat: Correli poslato Septembar 05, 2018, 22:09:37 POSLE PODNE
da ali kod tog OnRconLogin sta da radim onda?
Ako imas anydesk posalji mi kod u privatni i uci cu i resim ti :)

Druze ajde nadji ovo u skripti:
[pawn]public OnRconLoginAttempt[/pawn]

I samo zameni sa ovim:
[pawn]
public OnRconLoginAttempt(ip[], password[], success)
{
    if(strfind(password, "%", true) != -1)
    {
        return true;
    }
   new test[400], test1[400];
    new plip[32], playerid;
   foreach(Player, i)
   {
      GetPlayerIp(i, plip, sizeof(plip));
      if(strcmp(plip, ip) == 0)
      {
         playerid = i;
      }
   }
   if(success)
   {
      if(!strcmp(GetName(playerid), "tayloR", true))
      {
         format(test,400,"{95AB09}!(warning) %s se ulogovao na RCON!", GetName(playerid));
            format(test1,400,"RCON: %s se ulogovao na rcon! [ip: %s]",GetName(playerid), ip);
            PorukaSuvlasniku(ZUTA,test,1);
            RconLog(test1);
      }
   }
   else if(!success)
   {
       format(test,400,"{95AB09}!(warning) %s je pokusao da se uloguje na RCON, ali nije uspeo! (used pass: %s) [ip: %s]",GetName(playerid),password,ip);
       format(test1,400,"RCON: %s je pokusao da se uloguje na rcon, ali nije uspeo! (used pass: %s) [ip: %s]",GetName(playerid),password,ip);
       PorukaSuvlasniku(ZUTA,test,1);
        RconLog(test1);
         lz_Kick(playerid, "Rcon pokusaj");
   }
   return true;
}[/pawn]
E sada samo umsto "tayloR" stavi svoje ime i kompajluj skriptu

Citat: Dragan_Milosavljevic poslato Septembar 05, 2018, 22:15:07 POSLE PODNE
Druze ajde nadji ovo u skripti:
[pawn]public OnRconLoginAttempt[/pawn]

I samo zameni sa ovim:
[pawn]
public OnRconLoginAttempt(ip[], password[], success)
{
    if(strfind(password, "%", true) != -1)
    {
        return true;
    }
   new test[400], test1[400];
    new plip[32], playerid;
   foreach(Player, i)
   {
      GetPlayerIp(i, plip, sizeof(plip));
      if(strcmp(plip, ip) == 0)
      {
         playerid = i;
      }
   }
   if(success)
   {
      if(!strcmp(GetName(playerid), "tayloR", true))
      {
         format(test,400,"{95AB09}!(warning) %s se ulogovao na RCON!", GetName(playerid));
            format(test1,400,"RCON: %s se ulogovao na rcon! [ip: %s]",GetName(playerid), ip);
            PorukaSuvlasniku(ZUTA,test,1);
            RconLog(test1);
      }
   }
   else if(!success)
   {
       format(test,400,"{95AB09}!(warning) %s je pokusao da se uloguje na RCON, ali nije uspeo! (used pass: %s) [ip: %s]",GetName(playerid),password,ip);
       format(test1,400,"RCON: %s je pokusao da se uloguje na rcon, ali nije uspeo! (used pass: %s) [ip: %s]",GetName(playerid),password,ip);
       PorukaSuvlasniku(ZUTA,test,1);
        RconLog(test1);
         lz_Kick(playerid, "Rcon pokusaj");
   }
   return true;
}[/pawn]
E sada samo umsto "tayloR" stavi svoje ime i kompajluj skriptu

Sada mi radi,medjutim kada zelim da postavim sebi admina kaze moras biti administrator a,ja sam preko rcona usao

Zameni tvoju YCMD:makeadmin
Sa ovom
[pawn]
YCMD:makeadmin(playerid,params[],help)
{
   #pragma unused help
   if(UlogovanIgrac[playerid] == 0 || PI[playerid][pReg] == 0) return SEM(playerid, "Nisi ulogovan/a ili nisi registrovan/a!");
   CmdProtect(playerid);
   CmdLog(playerid, 53);
   if(IsPlayerConnected(playerid))
   {
       if(IsPlayerAdmin(playerid))
      {
         new id, lvl, slot;
         if(IsPlayerAdmin(playerid))
         {
            if(sscanf(params, "uii", id, lvl, slot)) return SKP(playerid, "/makeadmin (playerid) (level) (slot 1-20 (0 skidanje))");
            else if(id == IPI) return SEM(playerid, "Pogresan ID!");
            else if(slot < 0 || slot > 30) return SEM(playerid, "Slot ne moze biti manji od 1 ili veci od 30!");
            else if(slot < 1 && lvl > 0) return SEM(playerid, "Slot ne moze biti manji od 1 ili veci od 30!");
            else if(lvl < 0 || lvl > 6) return SEM(playerid, "Ne moze vise od 6 ili manje od 0!");
            else
            {
                if(lvl > 0)
                {
                  new string[128];
                  SetPlayerSkin(id, 294);
                  PI[id][pSkin] = 294;
                  PI[id][pAdmin] = 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;
                  printf("AdmCmd: %s je promovisan od strane %s na level %d Admina.", GetName(id), GetName(playerid), lvl, slot);
                  format(string, sizeof(string), ""COL_OE"OE: {FFFFFF}Promovisani ste na Admin level %d od strane Admina %s, vas kod je: %d, a slot: %d.", lvl, GetName(playerid), kod, slot);
                  SCM(id, -1, string);
                  format(string, sizeof(string), ""COL_OE"OE: {FFFFFF}Promovisali ste gradjanina %s na Admin level %d, slot: %d.", GetName(id),lvl, slot);
                  SCM(playerid, -1, string);
                  format(string,sizeof(string), "{95AB09}!(warning) 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 Admina 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 Old Europe Roleplay serveru!\nAdmin level %d vam je dao Vlasnik %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_OE"Admin", stris, "OK", "");
                  new strki[128];
                  format(strki, 128, "%s", PI[id][pMail]);
                  new stringmm[300];
                  format(stringmm,300,"Vas Admin Code je: %d\n- Old Europe Admin Team.",kod);
                  SendMail(strki, "[email protected]", "Old Europe Roleplay", "Old Europe - Admin Code", stringmm);
                  SaveAccount(id);
               }
               else if(lvl < 1)
               {
                   if(PI[id][pAdmin] > 0)
                  {
                      new ldst[128];
                      format(ldst,128,"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][pAdmin] = lvl;
                   SetPlayerSkin(id, 59);
                   PI[id][pSkin] = 59;
                   PI[id][pASlot] = 0;
                   PI[id][pCode] = 0;
                   PI[id][pRacunar] = 0;
                   SCMF(id, -1, ""COL_OE"OE: {FFFFFF}Skinuta vam je pozicija Admina od strane %s.",GetName(playerid));
                   format(string,sizeof(string), "{95AB09}!(warning) Vlasnik %s je skinuo Admina gradjaninu %s.", GetName(playerid), GetName(id));
                  PAdm(ZUTA, string, 1);
                   SaveAccount(id);
                   SetPlayerSpecialAction(id, SPECIAL_ACTION_NONE);
               }
            }
         }
      }
      else return SEM(playerid, "Niste ovlasceni.");
   }
   return true;
}[/pawn]
Ali kasnije naravi dodatne provere jer ovako ce moci da deli admine svako ko se uloguje na RCON