[POMOC] /ban

Započeo William Johnson, Jul 13, 2011, 21:57:29 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Street Stories
Detaljan opis problema: Kad ja idem /ban nebana samo nick neg i IP i kako da namjestim da kad ga banuje da mi pokaze njegovu IP??? evo vam ta komanda /ban!
Dio skripte:
Neke slike/video za lakse dobivanje pomoci(neobavezno):

   if(strcmp(cmd, "/ban", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /ban [playerid/PartOfName] [reason]");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 4)
         {
             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, "Koristite: /ban [playerid/PartOfName] [reason]");
                     return 1;
                  }
                  new year, month,day;
                  getdate(year, month, day);
                  format(string, sizeof(string), "[ADMIN]: %s je banovan od strane %s, razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
                  BanLog(string);
                  format(string, sizeof(string), "[ADMIN]: %s je banovan od strane %s, razlog: %s", giveplayer, sendername, (result));
                  SendClientMessageToAll(COLOR_LIGHTRED, string);
                  PlayerInfo[giveplayerid][pLocked] = 1;
                  Ban(giveplayerid);
                  return 1;
               }
            }
         }
         else
         {
            format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
            SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }

   if(strcmp(cmd, "/ban", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
          tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /ban [playerid/PartOfName] [reason]");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 4)
         {
             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, "Koristite: /ban [playerid/PartOfName] [reason]");
                     return 1;
                  }
                  new year, month,day;
                  getdate(year, month, day);
                  format(string, sizeof(string), "[ADMIN]: %s je banovan od strane %s, razlog: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
                  BanLog(string);
                  new IP[48];
                  GetPlayerIp(giveplayerid, IP, sizeof(IP));
                  format(string,sizeof(string, "IP Igraca kojeg ste banali[%s] je [%d]!",giveplayer,IP);
                  SendClientMessage(playerid,-1,string);
                  format(string, sizeof(string), "[ADMIN]: %s je banovan od strane %s, razlog: %s", giveplayer, sendername, (result));
                  SendClientMessageToAll(COLOR_LIGHTRED, string);
                  PlayerInfo[giveplayerid][pLocked] = 1;
                  Ban(giveplayerid);
                  return 1;
               }
            }
         }
         else
         {
            format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
            SendClientMessage(playerid, COLOR_GRAD1, string);
         }
      }
      return 1;
   }

Trebalo bi da radi...

Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √