Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.25 KB | None | 0 0
  1. // CMD ALGEMAR
  2.  
  3. CMD:algemar(playerid, params[])
  4. {
  5.     new JogadorAlgemado;
  6.     new Float:x, Float:y, Float:z;
  7.     if(sscanf(params,"u",JogadorAlgemado))return SendClientMessage(playerid, COR_ERRO, "Digite: /algemar ID");
  8.     if(!IsPlayerConnected(JogadorAlgemado)) return SendClientMessage(playerid, COR_ERRO, "Você não digitou um ID valido ou o jogador esta desconectado");
  9.     if(InfoJogador[playerid][Organizacao] <= 4)
  10.     {
  11.         if(CartaoBatido[playerid] == 1)
  12.         {
  13.             if(JogadorAlgemado == playerid)
  14.             {
  15.                 SendClientMessage(playerid, COR_ERRO, "Você não pode algemar a si mesmo");
  16.             }
  17.             else
  18.             {
  19.                 if(InfoJogador[JogadorAlgemado][Organizacao] <= 2)
  20.                 {
  21.                     SendClientMessage(playerid, COR_ERRO, "Você não pode algemar um oficial!");
  22.                 }
  23.                 else
  24.                 {
  25.                     GetPlayerPos(JogadorAlgemado, x, y, z);
  26.                     if(DistanciaDoJogador(2.0, playerid, x, y, z))
  27.                     {
  28.                         if(GetPlayerSpecialAction(JogadorAlgemado) == SPECIAL_ACTION_HANDSUP)
  29.                         {
  30.                             SetPlayerSpecialAction(JogadorAlgemado, SPECIAL_ACTION_NONE);
  31.                             ClearAnimations(JogadorAlgemado);
  32.                             SendClientMessage(JogadorAlgemado, COR_CERTO, "Você foi algemado!");
  33.                             SendClientMessage(playerid, COR_CERTO, "Você algemou o suspeito!");
  34.                             SetPlayerSpecialAction(JogadorAlgemado, SPECIAL_ACTION_CUFFED);
  35.                             return 1;
  36.                         }
  37.                         else { return SendClientMessage(playerid, COR_ERRO, "O Suspeito não está com as mãos para cima!"); }
  38.                     }
  39.                     else { return SendClientMessage(playerid, COR_ERRO, "Você está muito longe do suspeito!");}
  40.                 }
  41.             }
  42.         }
  43.         else {return SendClientMessage(playerid, COR_ERRO, "Você não está em serviço!");}
  44.     }
  45.     else {return SendClientMessage(playerid, COR_ERRO, "Você não é um oficial!");}
  46.     return 1;
  47. }
  48.  
  49.  
  50. // CMD Batercartaoadm
  51.  
  52. CMD:hd(playerid)
  53. {
  54.  if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED)
  55.  {
  56.     SendClientMessage(playerid, COR_ERRO, "Você está algemado e não pode utilizar este comando.");
  57.     return 1;
  58.  }
  59.  else
  60.  {
  61.     SetPlayerSpecialAction(playerid, SPECIAL_ACTION_HANDSUP);
  62.     return 1;
  63.  }
  64. }
  65.  
  66. // CMD R
  67.  
  68. CMD:r(playerid, params[])
  69. {
  70.     if(InfoJogador[playerid][Organizacao] >= 1)
  71.     {
  72.         new MensagemR[128];
  73.         new CargoJogador;
  74.         CargoJogador = InfoJogador[playerid][Cargo];
  75.         if(sscanf(params,"s[128]",MensagemR)) return SendClientMessage(playerid, COR_ERRO, "Digite: /r [TEXTO]");
  76.         {
  77.             format(gstring, sizeof(gstring), "%s %s: %s", CargoJogador, NomeJogador(playerid), MensagemR);
  78.             LoopChatOrg(COR_CHATADM, gstring, InfoJogador[playerid][Organizacao]);
  79.             return 1;
  80.         }
  81.     }
  82.     else {return SendClientMessage(playerid, COR_ERRO, "Você não está em nenhuma organização!");}
  83. }
  84.  
  85. // PUBLIC DO R
  86. public LoopChatOrg(COLOR, const string[], OrgChat)
  87. {
  88.     for (new i = 0; i < MAX_PLAYERS; i++)
  89.     {
  90.         if(IsPlayerConnected(i))
  91.         {
  92.             if(InfoJogador[i][Organizacao] == OrgChat)
  93.             {
  94.                 SendClientMessage(i, COLOR, string);
  95.             }
  96.         }
  97.     }
  98.     return 1;
  99. }
  100.  
  101. // CMD BATER CARTAO ADM
  102.  
  103. CMD:batercartaoadm(playerid, params[])
  104. {
  105.     if(InfoJogador[playerid][Administrador] >= 4)
  106.     {
  107.         if(AdminTrabalhando[playerid] == 1)
  108.         {
  109.             new JogadorSemCartao, Nomeadmin[32], Nomeplayer[32];
  110.             if(sscanf(params,"u",JogadorSemCartao)) return SendClientMessage(playerid, COR_ERRO, "Digite /tirarcartao [ID]");
  111.             if(!IsPlayerConnected(JogadorSemCartao)) return SendClientMessage(playerid, COR_ERRO, "Você não digitou um ID valido ou o jogador está desconectado.");
  112.             {
  113.                 if(CartaoBatido[JogadorSemCartao] == 1)
  114.                 {
  115.                     CartaoBatido[JogadorSemCartao] = 0;
  116.                     GetPlayerName(playerid, Nomeadmin, sizeof(Nomeadmin));
  117.                     GetPlayerName(playerid, Nomeplayer, sizeof(Nomeplayer));
  118.                     format(gstring,sizeof(gstring),"O Administrador %s forçou você a bater o cartão", Nomeadmin);
  119.                     SendClientMessage(JogadorSemCartao, COR_ERRO, gstring);
  120.                     format(gstring,sizeof(gstring),"Você forçou o jogador %s a bater o cartão", Nomeplayer);
  121.                     SendClientMessage(playerid ,COR_ERRO, gstring);
  122.                     SendClientMessage(playerid, COR_ERRO, "Você foi tirado de serviço!");
  123.                     SetPlayerColor(JogadorSemCartao, COR_CIVIL);
  124.                     SetPlayerSkin(JogadorSemCartao, 60);
  125.                     return 1;
  126.                 }
  127.                 else
  128.                 {
  129.                     CartaoBatido[JogadorSemCartao] = 1;
  130.                     GetPlayerName(playerid, Nomeadmin, sizeof(Nomeadmin));
  131.                     GetPlayerName(playerid, Nomeplayer, sizeof(Nomeplayer));
  132.                     format(gstring,sizeof(gstring),"O Administrador %s forçou você a bater o cartão", Nomeadmin);
  133.                     SendClientMessage(JogadorSemCartao, COR_ERRO, gstring);
  134.                     format(gstring,sizeof(gstring),"Você forçou o jogador %s a bater o cartão", Nomeplayer);
  135.                     SendClientMessage(playerid, COR_ERRO, gstring);
  136.                     SendClientMessage(playerid, COR_ERRO, "Você foi posto em serviço!");
  137.                     SetarCorPlayer(JogadorSemCartao);
  138.                     SetPlayerSkin(JogadorSemCartao, 185);
  139.                     return 1;
  140.                 }
  141.             }
  142.         }
  143.         else { return SendClientMessage(playerid, COR_ERRO, "Você não está trabalhando, /administrar");}
  144.     }
  145.     else { return SendClientMessage(playerid, COR_ERRO, "Você não está autorizado a usar este comando!");}
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement