[POMOC] /kick | /ban

Započeo Spetsnaz, Novembar 01, 2010, 12:38:54 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Ovako na mom modu ima samo 1 bag to je kad kuas /kick ili /ban pise ti /kick : You are not an admin a ja jesam admin 1338 a potrebno je admin 1 dali ako uzmem i prekopiram kick komandu sa nekog drugog moda na kom kick radi dalice se popraviti?Ako nece dali neko zna kako se to popravlja i da to sam zaboravio kada kucam /rcon login sifru radi mi i kick i ban to znaci da ima veze sa tim!!!
Poslednja Izmena: Novembar 01, 2010, 20:21:04 POSLE PODNE od [Saw]BloodMaster


cristiane

Citat: David Škrbić poslato Novembar 01, 2010, 12:44:34 POSLE PODNE
Daj mi kod komande
Nije cilj samo daj uradim ti,treba mu malo objasniti.,

Nadji kick komandu u modu i ispod giveplayerid = ReturnUser(tmp); dodaj if (PlayerInfo[playerid][pAdmin] >= 1 taj broj 1 ti je da mogu admini od lvl 1 do 1338 kickat il npr ako zelis samo da 1338 moze kick samo zamjeni broj 1 sa 1338,tako isto i za ban komandu i naravno ako se radi o gf modu

Planirao sam da mu objasnim ali sad netreba

Sto se tice tog keca nisam ja noob znam da to znaci ako je admin level 1 on moze da koristi ovu komandu
sacu da ti dam kako ide komanda
    if(strcmp(cmd, "/kick", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "UPOTREBA: /kick [playerid/PartOfName] [razlog]");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
         {
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                  GetPlayerName(playerid, sendername, sizeof(sendername));
                  new length = strlen(cmdtext);
                  while ((idx < length) && (cmdtext[idx] <= ' '))
                  {
                     idx++;
                  }
                  new offset = idx;
                  new result[64];
                  while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                  {
                     result[idx - offset] = cmdtext[idx];
                     idx++;
                  }
                  result[idx - offset] = EOS;
                  if(!strlen(result))
                  {
                     SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kick [playerid/PartOfName] [reason]");
                     return 1;
                  }
                  new year, month,day;
                  getdate(year, month, day);
                  format(string, sizeof(string), "AdmCmd: %s je kickan od admina %s, razlog: %s", giveplayer, sendername, (result));
                  format(string, sizeof(string), "AdmCmd: %s je kickan od admina %s, razlog: %s", giveplayer, sendername, (result));
                  SendClientMessageToAll(COLOR_LIGHTRED, string);
                  SendClientMessage(giveplayerid,COLOR_LIGHTRED,"____________________________________________________");
                     format(string, sizeof(string), "Dobio si kick od admina %s", sendername);
                     SendClientMessage(giveplayerid,COLOR_WHITE, string);
                     format(string, sizeof(string),"Razlog: %s ", (result));
                      SendClientMessage(giveplayerid,COLOR_WHITE, string);
                     format(string, sizeof(string), "Datum: %d/%d/%d", day,month,year);
                      SendClientMessage(giveplayerid,COLOR_WHITE,string);
                      SendClientMessage(giveplayerid,COLOR_LIGHTRED,"____________________________________________________");
                      Kick(giveplayerid);
                      KickLog(string);
                  return 1;
               }
            }
         }
         else
         {
            format(string, sizeof(string), "   %d nije aktivan igraÃÆ'�ïÃ,¿Ã,½ÃÆ'Ã,¯Ã‚Ã,¿Ã‚Ã,½ÃÆ'�ïÃ,¿Ã,½ÃÆ'�ÂÃ,¨.", giveplayerid);
            SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }
   if(strcmp(cmd, "/skick", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /skick [playerid/PartOfName]");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 1337)
         {
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                    Kick(giveplayerid);
                }
            }
         }
         else
         {
            format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
            SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }
   if(strcmp(cmd, "/kickres", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           if (PlayerInfo[playerid][pAdmin] < 1)
         {
            return 1;
         }
          tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kickres [level] [ammount]");
            return 1;
         }
         new level = strval(tmp);
         if(level < 0 || level > 5) { SendClientMessage(playerid, COLOR_GREY, "   Can only Reserved Slots Kick from level 0 to 5 !"); return 1; }
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /kickres [level] [ammount]");
            return 1;
         }
         new ammount = strval(tmp);
         if(ammount < 1 || ammount > 10) { SendClientMessage(playerid, COLOR_GREY, "   Can only Reserved Slots Kick of a maximum of 10 players !"); return 1; }
         for(new i = 0; i < MAX_PLAYERS; i++)
         {
             if(IsPlayerConnected(i))
             {
                 if(PlayerInfo[pLevel] == level && PlayerInfo[pAdmin] < 1 && PlayerInfo[pDonateRank] < 1 && ammount > 0)
                 {
                     ammount -= 1;
                  Kick(i);
                 }
             }
         }
      }
      return 1;
   }

cristiane

Ma nije to do komande,stavi si admin level 2 i probaj kick,mozda nemas u modu 1338 lvl admina.,o kojem modu se radi?

probao sam i stavio sam admin level 2 i izbrisao sam da samo moze admine ne i GM ali nece ali znas sta je fora radi /kickres /skick samo neradi direktan /kick i /ban :D radi se o modu mojgm i jos sam ga ja nesto preradio ali nisam dorao tako nesto da ne bi zbog toga moglo da radi :D

Odi u server.cfg i pod linijom: filterscripts, obrisi: base

ja mislim da trebas delete base u server.cfg
Poslednja Izmena: Novembar 01, 2010, 20:23:48 POSLE PODNE od heber

Citat: heber poslato Novembar 01, 2010, 20:23:27 POSLE PODNE
ja mislim da trebas delete base u server.cfg

Ali onda nece moci pokren't server jer ce mu srat da base nepostoji

samo obrisi base iz server.cfg

zna neko da mi pomogne? ok super svaka cast njemu ali sto to pises na moje pitanje ??? pisi to tamo negde gde treba