Guest User

Untitled

a guest
Dec 8th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 7.59 KB | None | 0 0
  1. // Comandos Complementares , Adicione no GM por favor.
  2. CMD:tempban(playerid,params[])
  3. {
  4.  static
  5.  string[256],DiaB,giveid,motivo[256],arq[20];
  6.  if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,ROXO,"Você não é um admin logado na rcon");
  7.  if(sscanf(params,"us[256]i",giveid,motivo,DiaB)) return SendClientMessage(playerid,AMARELO,"/tempban [ID] [Motivo] [Dias] !");
  8.  new sendername[MAX_PLAYER_NAME],givename[MAX_PLAYER_NAME]; GetPlayerName(giveid,givename,sizeof(givename)); GetPlayerName(playerid,sendername,sizeof(sendername));
  9.  if(DiaB > 360) return SendClientMessage(playerid,ROXO,"Erro:Maximo de dias ate 360 !");
  10.  format(string,sizeof(string),"AdmCMD:O jogador %s foi banido por %d pelo motivo de :%s",givename,sendername,DiaB);
  11.  SendClientMessageToAll(AMARELO,string);
  12.  format(string,sizeof(string),"Voçe foi banido por %s com %d dias pelo motivo de:%s",sendername,DiaB,motivo);
  13.  SendClientMessage(giveid,ROXO,string);
  14.  format(arq,sizeof(arq),"LOG/%s.ini",givename);
  15.  {
  16.      if(!DOF2_FileExists(arq))
  17.      {
  18.          DOF2_CreateFile(arq);
  19.          DOF2_SetInt(arq,"Ban",DiaB);
  20.          DOF2_SetString(arq,"Motivo",motivo);
  21.          PlayerInfo[giveid][pBandia] = getdate()*DiaB;
  22.          DOF2_SaveFile();
  23.   }
  24.  }
  25.  return 1;
  26. }
  27.  
  28. public OnPlayerConnect(playerid)
  29. {
  30.  new year,month,day;
  31.  getdate(year,month,day);
  32.  if(getdate() >= PlayerInfo[playerid][pBandia] > 0)
  33.  {
  34.      new lol,file[50];
  35.      while(lol > PlayerInfo[playerid][pBandia])
  36.      {
  37.    format(file,sizeof(file),"LOG/%s.ini",lol);
  38.       new string[256],sendername[MAX_PLAYER_NAME];
  39.       GetPlayerName(playerid,sendername,sizeof(sendername));
  40.       format(string,sizeof(string),"Nick:%s\nMotivo De:%s\nDias%d",sendername,DOF2_GetString(file,"Motivo"),DOF2_GetInt(file,"Ban"));
  41.       ShowPlayerDialog(playerid,1577,DIALOG_STYLE_MSGBOX,"Info Ban",string,"Ok","");
  42.    PlayerInfo[playerid][pBandia] -= day*3600;
  43.    Kick(playerid);
  44.    return 1;
  45.   }
  46.   return 1;
  47.  }
  48. CMD:bkick(playerid)
  49. {
  50.  if(!BKICK[playerid]) return SendClientMessage(playerid,ROXO,"AdmCMD:Você já bloqueou o kick do ADMIN %s !");
  51.  if(BKICK[playerid] == true)
  52.  {
  53.   SendClientMessage(playerid,AMARELO,"Você bloqueou o kick do ADMIN %s !");
  54.   BKICK[playerid] == false;
  55.   return 1;
  56.  }
  57.  return 1;
  58. }
  59. /* Topo do GM new bool:BKICK[MAX_PLAYES] = false; e if(!IsPlayerAdmin(playerid)) */
  60.  
  61. CMD:mudarnick(playerid,params[])
  62. {
  63.  new ano,mes,dia;
  64.  getdate(ano,mes,dia);
  65.  new novonick[256],sendername[MAX_PLAYER_NAME],giveid,string[100+2];
  66.  GetPlayerName(giveid,sendername,sizeof(sendername));
  67.  if(sscanf(params,"us[256]",novonick)) return SendClientMessage(playerid,ROXO,"/mudarnick [ID] [Novo Nome]");
  68.  format(string,sizeof(string),"AdmCMD:Você mudou o novo nick para %s %i/%i/%i",novonick,ano,mes,dia);
  69.  SendClientMessage(giveid,AMARELO,string);
  70.  for(new letras=0; letras<sizeof(Palavrao); letras++)
  71.  {
  72.      if(strcmp(novonick,Palavrao[letras],true) == 0)
  73.      SendClientMessage(playerid,ROXO,"Erro:Você não pode digitar essa palavra !");
  74.      return 1;
  75.  }
  76.  if(IsPlayerConnected(giveid))
  77.  {
  78.      new lol[50];
  79.      format(lol,sizeof(lol),"Texto/%s.txt",sendername);
  80.      if(!DOF2_FileExists:D)
  81.      {
  82.          DOF2_CreateFile:D;
  83.          DOF2_SetString(lol,"NovoNome",novonick);
  84.    DOF2_SetInt(lol,"Ano",ano);
  85.    DOF2_SetInt(lol,"Mes",mes);
  86.    DOF2_SetInt(lol,"Dia",dia);
  87.    DOF2_SaveFile();
  88.   }
  89.   return 1;
  90.  }
  91.  return 1;
  92. }
  93.  
  94. CMD:report(playerid,params[])
  95. {
  96.  static
  97.      string[256],texto[256],arquivo[20];
  98.  new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid,sendername,sizeof(sendername));
  99.  if(sscanf(params,"s[256]",texto)) return SendClientMessage(playerid,AMARELO,"/report [TEXTO] !");
  100.  format(string,sizeof(string),"Reporte de %s Texto>%s",sendername,texto);
  101.  {
  102.      for(new i=0, j=GetMaxPlayers(); j!=i; i++)
  103.      {
  104.    if(IsPlayerConnected(i))
  105.    {
  106.        if(PlayerInfo[i][pAdmin] > 0)
  107.        {
  108.            format(arquivo,sizeof(arquivo),"Texto/%s.txt",texto);
  109.            DOF2_SetString(arquivo,"Nome",sendername);
  110.            DOF2_SetString(arquivo,"TextLoL",texto);
  111.            SendClientMessage(i,ROXO,string);
  112.            Maximodereposts ++;
  113.            return 1;
  114.     }
  115.    }
  116.   }
  117.   return 1;
  118.  }
  119. }
  120. CMD:reports(playerid)
  121. {
  122.  if(!IsPlayerAdmin(playerid))
  123.  {
  124.      new sendername[MAX_PLAYER_NAME];
  125.      GetPlayerName(playerid,sendername,sizeof(sendername));
  126.   new string[256],arquivo[50];
  127.    format(arquivo,sizeof(arquivo),"Texto/%s.txt");
  128.   format(string,sizeof(string),"Report de:%s, Motivo:%s\nQuantidade de report [%d]",DOF2_GetString(arquivo,"Nome"),DOF2_GetString(arquivo,"TextLoL"),Maximodereposts);
  129.   ShowPlayerDialog(playerid,13363,DIALOG_STYLE_MSGBOX,"Reports",string,"Ok","");
  130.   return 1;
  131.  }
  132.  return 1;
  133. }
  134. CMD:congelar(playerid,params[])
  135. {
  136.  new string[100],giveid[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
  137.  if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,VERMELHO,"Voce nao e administrador !");
  138.  if(sscanf(params,"id",id)) return SendClientMessage(playerid,-1,"/congelar [id]");
  139.  if(Logado[id] == false) return SendClientMessage(playerid,GetPlayerColor(playerid),"Esse jogador nao esta logado !");
  140.  if(Logado[playerid] == false) return SendClientMessage(playerid,LARANJA,"Voçe nao esta logado !");
  141.  if(id != playerid) return SendClientMessage(playerid,-1,"Voce nao pode se congelar !");
  142.  GetPlayerName(id,giveid,sizeof(giveid));
  143.  GetPlayerName(playerid,sendername,sizeof(sendername));
  144.  format(string,sizeof(string),"AdmCMD:O Administrador %s congelou o player %s",sendername,giveid);
  145.  SendClientMessageToAll(LARANJA,string);
  146.  TogglePlayerControllable(id,false);
  147.  PlayerInfo[id][Congelados] = false;
  148.  return 1;
  149. }
  150. CMD:descongelar(playerid,params[])
  151. {
  152.  new string[100],giveid[MAX_PLAYER_NAME],sendername[MAX_PLAYER_NAME];
  153.  if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,VERMELHO,"Voce nao e administrador !");
  154.  if(sscanf(params,"id",id)) return SendClientMessage(playerid,-1,"/descongelar [id]");
  155.  if(Logado[id] == false) return SendClientMessage(playerid,GetPlayerColor(playerid),"Esse jogador nao esta logado !");
  156.  if(Logado[playerid] == false) return SendClientMessage(playerid,LARANJA,"Você não está logado !");
  157.  if(id != playerid) return SendClientMessage(playerid,-1,"Você não pode se descongelar !");
  158.  GetPlayerName(id,giveid,sizeof(giveid));
  159.  GetPlayerName(playerid,sendername,sizeof(sendername));
  160.  format(string,sizeof(string),"AdmCMD:O Administrador %s Descongelou o player %s",sendername,giveid);
  161.  SendClientMessageToAll(LARANJA,string);
  162.  TogglePlayerControllable(id,true);
  163.  PlayerInfo[id][Congelados] = true;
  164.  return 1;
  165. }
  166. CMD:congelados(playerid)
  167. {
  168.  if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid,-1,"Você não é administrador !");
  169.  if(Logado[playerid] == false) return SendClientMessage(playerid,VERMELHO,"Você não está logado !");
  170.  for(new i=0; i<MAX_PLAYERS; i++)
  171.  {
  172.      if(IsPlayerConnected(i))
  173.      {
  174.          new textocongelado[30];
  175.          if(PlayerInfo[i][Congelados] == false) textocongelado = "Congelado";
  176.          if(PlayerInfo[i][Congelados] == true) textocongelado = "Descongelado";
  177.          {
  178.     new string[100],sendername[MAX_PLAYER_NAME];
  179.     GetPlayerName(i,sendername,sizeof(sendername));
  180.     format(string,sizeof(string),"Nick:{8000FF}%s:{FF0000}%s\n",sendername,textocongelado);
  181.     ShowPlayerDialog(playerid,1533,DIALOG_STYLE_MSGBOX,"Congelado",string,"Ok","");
  182.     return 1;
  183.    }
  184.   }
  185.   return 1;
  186.  }
  187.  return true;
  188. }
  189. /* Adicionar no OnplayerConnect
  190. PlayerInfo[playerid][Congelado] = true;
  191. PlayerInfo[playerid][Congelados] = true;
  192. */
Add Comment
Please, Sign In to add comment