[pomoc] ban

Započeo spiro616, April 18, 2011, 17:52:40 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:edit Ravensa
Detaljan opis problema:Kad banujem nekog,bana mu samo ip a ne i ime,a imam anticheat [WEBERAC]
Dio skripte:n/a
Neke slike/video za lakse dobivanje pomoci(neobavezno):n/a



if(strcmp(cmd, "/ban", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           new playersip[64];
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /ban [playerid/Dio Imena] <reason>");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 3 || IsPlayerAdmin(playerid))
         {
             if(IsPlayerConnected(giveplayerid))
             {
                 if(giveplayerid != INVALID_PLAYER_ID)
                 {
                   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                  GetPlayerIp(giveplayerid,playersip,sizeof(playersip));
                  new length = strlen(cmdtext);
                  while ((idx < length) && (cmdtext[idx] <= ' '))
                  {
                     idx++;
                  }
                  new offset = idx;
                  new result[128];
                  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, "KORISTI: /ban [playerid/Dio Imena] [reason]");
                     return 1;
                  }
                  if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* Nemozes to napraviti ovom igracu!");
                  new targetlevel = PlayerInfo[giveplayerid][pAdmin];
                  new playerlevel = PlayerInfo[playerid][pAdmin];
                  if(targetlevel > playerlevel) return SendClientMessage(playerid, COLOR_GREY, "* Nemozes banati ljude veceg ranka od tebe!");
                  new y, m, d;
                  new h,mi,s;
                  getdate(y,m,d);
                  gettime(h,mi,s);
                  format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je banan od %s zbog: %s",d,m,y,h,mi,s,giveplayer,sendername, (result));
                  BanLog(string);
                  format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Banan si od %s - Razlog: %s",d,m,y,h,mi,s,sendername,(result));
                  AddPunishment(giveplayerid, string);
                  format(string, sizeof(string), "%s (%d), je banan od Admin-a %s zbog %s", giveplayer, giveplayerid, sendername, (result));
                  SendClientMessageToAll(COLOR_NICERED, string);
                  format(string, sizeof(string), "[ADMIN]: %s je dodan na listu bananih %s", playersip, sendername);
                  SendAdminMessage(COLOR_WHITE, string);
                  format(string, sizeof(string), "Banan si od strane Admin-a %s zbog %s", sendername, (result));
                  SendClientMessage(giveplayerid,COLOR_LIGHTBLUE, string);
                  SendClientMessage(giveplayerid,COLOR_BLUE, "Ako mislis da je to greska, prijavi adminu");
                  SendClientMessage(giveplayerid,COLOR_BLUE, "Postavi zahtjev na forumu za unban");
                  SendClientMessage(giveplayerid,COLOR_LIGHTRED, "Ne ocajavaj, Jer mozda neces dobiti unban");
                    SafeSetPlayerPos(giveplayerid,264.6288,77.5742,1001.0391);
                      SafeSetPlayerInterior(giveplayerid, 6);
                     PlayerInfo[giveplayerid][pJailTime] = 300;
                  PlayerInfo[giveplayerid][pJailed] = 1;
                  format(string, sizeof(string), "~r~~h~Admin Ban: ~n~~r~%s",(result));
                  GameTextForPlayer(giveplayerid, string, 6000, 3);
                  PlayerInfo[giveplayerid][pPending] = 0;
                  Ban(giveplayerid);
                  return 1;
               }
            }//not connected
         }
         else
         {
            format(string, sizeof(string), "** %d nije online.", giveplayerid);
            SendClientMessage(playerid, COLOR_ORANGE, string);
         }
      }
      return 1;
   }

a ima i

if(strcmp(cmd, "/rban", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
           new playersip[64];
         tmp = strtok(cmdtext, idx);
         if(!strlen(tmp))
         {
            SendClientMessage(playerid, COLOR_GRAD2, "KORISTI: /rban [playerid/Dio Imena] <reason>");
            return 1;
         }
         giveplayerid = ReturnUser(tmp);
         if (PlayerInfo[playerid][pAdmin] >= 5 || IsPlayerAdmin(playerid))
         {
             if(IsPlayerConnected(giveplayerid))
             {
                 if(giveplayerid != INVALID_PLAYER_ID)
                 {
                   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                  GetPlayerIp(giveplayerid,playersip,sizeof(playersip));
                  new length = strlen(cmdtext);
                  while ((idx < length) && (cmdtext[idx] <= ' '))
                  {
                     idx++;
                  }
                  new offset = idx;
                  new result[128];
                  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, "KORISTI: /rban [playerid/Dio Imena] [reason]");
                     return 1;
                  }
                  if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* Nemozes to napraviti ovom igracu!");
                  new targetlevel = PlayerInfo[giveplayerid][pAdmin];
                  new playerlevel = PlayerInfo[playerid][pAdmin];
                  if(targetlevel > playerlevel) return SendClientMessage(playerid, COLOR_GREY, "* Nemozes banati ljude veceg ranka od tebe!");
                  new y, m, d;
                  new h,mi,s;
                  getdate(y,m,d);
                  gettime(h,mi,s);
                  format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je dobio range ban od %s zbog: %s",d,m,y,h,mi,s,giveplayer,sendername, (result));
                  BanLog(string);
                  format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Range Banan od %s - Razlog: %s",d,m,y,h,mi,s,sendername,(result));
                  AddPunishment(giveplayerid, string);
                  format(string, sizeof(string), "%s (%d), je dobio Range Ban od Admin-a %s zbog %s", giveplayer, giveplayerid, sendername, (result));
                  SendClientMessageToAll(COLOR_NICERED, string);
                  format(string, sizeof(string), "[ADMIN]: %s je dodan na ban listu od %s", playersip, sendername);
                  SendAdminMessage(COLOR_WHITE, string);
                  format(string, sizeof(string), "Dobio si Range Ban od Admin-a %s zbog %s", sendername, (result));
                  SendClientMessage(giveplayerid,COLOR_LIGHTBLUE, string);
                  SendClientMessage(giveplayerid,COLOR_BLUE, "Ako mislis da je to greska, prijavi adminu");
                  SendClientMessage(giveplayerid,COLOR_BLUE, "Postavi zahtjev na forumu za unban");
                  SendClientMessage(giveplayerid,COLOR_LIGHTRED, "Ne ocajavaj, Jer mozda neces dobiti unban");
                    SafeSetPlayerPos(giveplayerid,264.6288,77.5742,1001.0391);
                      SafeSetPlayerInterior(giveplayerid, 6);
                     PlayerInfo[giveplayerid][pJailTime] = 300;
                  PlayerInfo[giveplayerid][pJailed] = 1;
                  format(string, sizeof(string), "~r~~h~Admin Range Ban: ~n~~r~%s",(result));
                  GameTextForPlayer(giveplayerid, string, 6000, 3);
                  PlayerInfo[giveplayerid][pPending] = 0;
                  RangeBan(giveplayerid);
                  return 1;
               }
            }//not connected
         }
         else
         {
            format(string, sizeof(string), "** %d nije online.", giveplayerid);
            SendClientMessage(playerid, COLOR_ORANGE, string);
         }
      }
      return 1;
   }
Poslednja Izmena: April 18, 2011, 20:11:00 POSLE PODNE od spiro616