Advertisement
Guest User

AdminPorRcon V2.5 SAMP FilterScript

a guest
Apr 15th, 2013
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 47.11 KB | None | 0 0
  1. /*
  2.  
  3. |**::: SISTEMA DE ADMINISTRAÇÃO POR RCON :::**|
  4.  
  5.  
  6.  
  7. ..: Todos os comandos do FilterScript [ 25 Comandos ] :..
  8.  
  9.  
  10. /aduty - Entra em modo Admin Duty
  11. /acomandos - Mostra os de Administrador In-Game
  12. /matar - Mata o jogador
  13. /an(nounce) - Aparece uma mensagem do Admin no Chat
  14. /desarmar - Desarma o jogador
  15. /freeze - Congela o jogador
  16. /unfreeze - Descongela o jogador
  17. /kick - Kicka o jogador
  18. /ban - Bane o jogador
  19. /setmoney - [ V1.5 (fixado) ] - Dá dinheiro a um jogador
  20. /curar - Cura um jogador
  21. /darcolete - Dá colete a um jogador
  22. /restart - Reinicia o servidor (GMX)
  23. /spec - Dá Spectate a um jogador
  24. /specoff - Sai do modo Spectate
  25. /goto - Vai até o jogador
  26. /gethere - Trás o jogador para a posição do Admin
  27. /aj - Envia/Retira o jogador da Admin Jail
  28. /dararma - [ V1.5 ] - Dá uma arma ao jogador
  29. /setscore - [ V1.5 ] - Seta o score do jogador
  30. /respawncarros - [ V1.5 ] - Respawna todos os carros do servidor
  31. /criarcarro - [ V2.0 ] - Cria um carro nas coordenadas do administrador
  32. /apagarcarro - [ V2.0 ] - Apaga um carro
  33. /gotosf - [ V2.0 ] - Dá teleport do Admin para San Fierro
  34. /gotolv - [ V2.0 ] - Dá teleport do Admin para Las Venturas
  35. /gotols - [ V2.0 ] - Dá teleport do Admin para Los Santos
  36. /gotobb - [ V2.0 ] - Dá teleport do Admin para Blueberry
  37. /gotodm - [ V2.0 ] - Dá teleport do Admin para Dillimore
  38. /gotomg - [ V2.0 ] - Dá teleport do Admin para Mountgomery
  39. /gotofc - [ V2.0 ] - Dá teleport do Admin para Fort Carson
  40. /gotolb - [ V2.0 ] - Dá teleport do Admin para Las Barrancas
  41. /gotolp - [ V2.0 ] - Dá teleport do Admin para Las Pasayadas
  42. /gotopc - [ V2.0 ] - Dá teleport do Admin para Palomino Creek
  43. /gotoap - [ V2.0 ] - Dá teleport do Admin para Angel Pine
  44. /gotoeq - [ V2.0 ] - Dá teleport do Admin para El Quebrados
  45. /gotomc - [ V2.0 ] - Dá teleport do Admin para Mount Chiliad
  46. /fixar - [ V2.5 ] - Repara o carro
  47. /tocarmusicatodos - [ V2.5 ] - Com um link direto, toca a música para todo o servidor
  48. /desligarmusicatodos - [ V2.5 ] - Desliga a música para todo o servidor
  49. /setskin - [ V2.5 ] - Seta a skin a um jogador
  50. /setname - [ V2.5 ] - Muda o nome do jogador
  51. /ip - [ V2.5 ] - Checka o IP do jogador
  52. /addnitro - [ V2.5 ] - Adiciona nitro ao carro
  53. /coordevento - [ V2.5 ] - Seta as coordenadas do evento a ser criado
  54. /criarevento - [ V2.5 ] - Cria um evento
  55. /acabarevento - [ V2.5 ] - Acaba o evento criado
  56. /kickarevento - [ V2.5 ] - Kicka um jogador do evento
  57. /colocarbarreira - [ V2.5 ] - Coloca barreiras
  58. /apagarbarreiras - [ V2.5 ] - Apaga todas as barreiras
  59. /entrarevento - [ V2.5 ] - Entra no evento (Para todos os jogadores)
  60. /sairevento - [ V2.5 ] - Sai do evento (Para todos os jogadores)
  61. /pm - [ V1.5 ] - Envia uma PM ao jogador (Para todos os jogadores)
  62. /pcomandosplayer - [ V1.5 ] - O jogador pode ver os comandos para ele (Para todos os jogadores)
  63. /admins - [ V2.0 ] - O jogador vê os Admins online (Para todos os jogadores)
  64.  
  65.  
  66.  
  67. ..: Bugs conhecidos :..
  68.  
  69.  
  70. /setmoney bugado | V1.5 FIXED
  71.  
  72.  
  73.  
  74. ..: Créditos :..
  75.  
  76.  
  77. ATENÇÃO: Não remover os créditos, isso viola uma série de direitos de autor, que pode dar multa.
  78.  
  79. [
  80. "Art. 184. Violar direitos de autor e os que lhe são conexos:
  81.  
  82. Pena - detenção, de 3 (três) meses a 1 (um) ano, ou multa.
  83.  
  84. Artigo 1o: Se a violação consistir em reprodução total ou parcial, com intuito de lucro direto ou indireto, por qualquer meio
  85. ou processo, de obra intelectual, interpretação, execução ou fonograma, sem autorização expressa do autor,
  86. do artista intérprete ou executante, do produtor, conforme o caso, ou de quem os represente.
  87. ]
  88.  
  89. Criado e lançado por Bruxo00 aka Bruxo
  90.  
  91. © Copyright @ >2013 by Bruxo00
  92.  
  93. */
  94.  
  95. #if !defined isnull
  96.     #define isnull(%1) \
  97.                 ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
  98. #endif
  99.  
  100. #if defined MAX_PLAYERS
  101. #undef MAX_PLAYERS
  102. #define MAX_PLAYERS (51)
  103. #endif
  104.  
  105. #include <a_samp>
  106. #include <zcmd>
  107. #include <sscanf>
  108. #include <streamer>
  109. #include <dini>
  110.  
  111. #define FAIL 0xAA3333AA
  112. #define SUCESSO 0x10F441AA
  113. #define INFO 0xB8860BAA
  114. #define INFO2 0xFF9900AA
  115. #define INFO3 0x0000CDFF
  116.  
  117. #define ADMIN_SPEC_TYPE_NONE 0
  118. #define ADMIN_SPEC_TYPE_PLAYER 1
  119. #define ADMIN_SPEC_TYPE_VEHICLE 2
  120.  
  121. forward KickTimer();
  122. forward BanTimer();
  123. forward RestartTimer();
  124. forward AjDeathTimer(playerid);
  125. forward RespawnCarrosTimer();
  126.  
  127. new checkduty[MAX_PLAYERS];
  128. new checkaj[MAX_PLAYERS];
  129. new checkevento[MAX_PLAYERS+1];
  130. new checkplayerevento[MAX_PLAYERS];
  131. new ObjetosCriados[128];
  132. new criados;
  133. new kickid;
  134. new banid;
  135. new nomeevento[32];
  136. new Float: eventox;
  137. new Float: eventoy;
  138. new Float: eventoz;
  139.  
  140. public OnFilterScriptInit()
  141. {
  142.     print("\n** | SISTEMA DE ADMINISTRADOR POR RCON CARREGADO | **\n");
  143.  
  144.     CreateDynamicObject(1684, 1233.50720, 646.84497, -3.66981,   0.00000, 0.00000, 358.08310);
  145.     CreateDynamicObject(1684, 1233.25684, 642.83417, -3.59419,   0.00000, 0.00000, 358.08310);
  146.     CreateDynamicObject(1684, 1233.30017, 638.62585, -3.69419,   0.00000, 0.00000, 358.08310);
  147.     CreateDynamicObject(16000, 1237.81702, 639.69025, -3.07025,   0.00000, 0.00000, 88.00768);
  148.     CreateDynamicObject(1684, 1233.10608, 634.79724, -3.61806,   0.00000, 0.00000, 358.08310);
  149.     CreateDynamicObject(16000, 1228.56531, 639.63593, -3.07025,   0.00000, 0.00000, 268.30762);
  150.     CreateDynamicObject(16000, 1233.64270, 629.29999, -3.07025,   0.00000, 0.00000, -0.05580);
  151.     CreateDynamicObject(1684, 1233.21082, 630.78326, -3.58797,   0.00000, 0.00000, 358.08310);
  152.     CreateDynamicObject(16000, 1233.79602, 647.35321, -3.07025,   0.00000, 0.00000, 181.00755);
  153. }
  154.  
  155. public OnFilterScriptExit()
  156. {
  157.     print("\n** | SISTEMA DE ADMINISTRADOR POR RCON DESCARREGADO | **\n");
  158. }
  159.  
  160. public OnPlayerDeath(playerid, killerid, reason)
  161. {
  162.     if(checkaj[playerid] == 1)
  163.     {
  164.         new playername[MAX_PLAYER_NAME+1];
  165.         new string[64+MAX_PLAYER_NAME+1];
  166.        
  167.         GivePlayerMoney(playerid, -2000);
  168.         GetPlayerName(playerid, playername, sizeof(playername));
  169.         format(string, sizeof(string), "O jogador %s suicidou-se na Admin Jail e perdeu 2000$!", playername);
  170.         SendClientMessageToAll(INFO2, string);
  171.         SetTimer("AjDeathTimer", 7000, false);
  172.     }
  173.     else
  174.     {
  175.         PlayAudioStreamForPlayer(playerid, "http://k003.kiwi6.com/hotlink/wnmh18c61r/sp0000.mp3");
  176.         return 0;
  177.     }
  178.     return 1;
  179. }
  180.  
  181. public AjDeathTimer(playerid)
  182. {
  183.     SendClientMessage(playerid, INFO, "Pensas que consegues sair? Nop :P");
  184.     SetPlayerPos(playerid, 1232.4852,640.1943,0.4801);
  185. }
  186.        
  187. CMD:aduty(playerid, params[]) // DUTY
  188. {
  189.     if(IsPlayerAdmin(playerid))
  190.     {
  191.         if(checkduty[playerid] == 0)
  192.         {
  193.             new playername[MAX_PLAYER_NAME+1];
  194.             new string[64+MAX_PLAYER_NAME+1];
  195.            
  196.             GetPlayerName(playerid, playername, sizeof(playername));
  197.             format(string, sizeof(string), "{FF0000}%s {D4CE24}está agora de serviço.", playername);
  198.             SendClientMessageToAll(INFO2, string);
  199.             SetPlayerHealth(playerid, 99999);
  200.             SetPlayerArmour(playerid, 99999);
  201.             SendClientMessage(playerid, INFO, "Estás agora em Serviço de Admin. Faz /acomandos para veres todos os comandos de Admin.");
  202.             SetPlayerColor(playerid, 0x10F441AA);
  203.             checkduty[playerid] = 1;
  204.         }
  205.         else
  206.         {
  207.             new name[MAX_PLAYER_NAME+1];
  208.             new string[64+MAX_PLAYER_NAME+1];
  209.            
  210.             GetPlayerName(playerid, name, sizeof(name));
  211.             format(string, sizeof(string), "{FF0000}%s {D4CE24}está agora fora de serviço.", name);
  212.             SendClientMessageToAll(INFO2, string);
  213.             SetPlayerColor(playerid, 0xFFFFFFAA);
  214.             SetPlayerHealth(playerid, 100);
  215.             SetPlayerArmour(playerid, 0);
  216.             checkduty[playerid] = 0;
  217.         }
  218.     }
  219.     else
  220.     {
  221.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  222.     }
  223.     return 1;
  224. }
  225.  
  226. CMD:acomandos(playerid, params[]) // ACOMANDOS
  227. {
  228.     if(IsPlayerAdmin(playerid))
  229.     {
  230.         SendClientMessage(playerid, SUCESSO, "----------[ -- COMANDOS DE ADMIN --]----------");
  231.         SendClientMessage(playerid, INFO, "\n/aduty   /matar   /an(nounce)   /desarmar   /freeze   /unfreeze   /kick");
  232.         SendClientMessage(playerid, INFO, "\n/ban   /setmoney   /curar   /darcolete   /aj   /restart   /spec   /specoff");
  233.         SendClientMessage(playerid, INFO, "\n/goto   /gethere   /dararma   /setscore   /respawncarros   /criarcarro");
  234.         SendClientMessage(playerid, INFO, "\n/apagarcarro   /gotolv   /gotols   /gotopc   /gotobb   /gotodm   /gotomg");
  235.         SendClientMessage(playerid, INFO, "\n/gotofc   /gotolb   /gotolp   /gotopc   /gotoap   /gotosf   /gotoeq   /gotomc");
  236.         SendClientMessage(playerid, INFO, "\n/fixar   /tocarmusicatodos   /desligarmusicatodos   /setskin   /ip   /setname");
  237.         SendClientMessage(playerid, INFO, "\n/addnitro   /coordevento   /criarevento   /acabarevento   /kickarevento");
  238.         SendClientMessage(playerid, INFO, "\n/colocarbarreira   /apagarbarreiras");
  239.     }
  240.     else
  241.     {
  242.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  243.     }
  244.     return 1;
  245. }
  246.  
  247. CMD:matar(playerid, params[]) // MATAR
  248. {
  249.     if(IsPlayerAdmin(playerid))
  250.     {
  251.         new id;
  252.         new nomeadmin[MAX_PLAYER_NAME];
  253.         new nomeplayer[MAX_PLAYER_NAME];
  254.         new string[128];
  255.         new string1[128];
  256.  
  257.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /matar [playerid]");
  258.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  259.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  260.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  261.         format(string, sizeof(string), "Tu mataste o jogador %s.", nomeplayer);
  262.         format(string1, sizeof(string1), "O Administrador %s matou-te.", nomeadmin);
  263.         SendClientMessage(playerid, SUCESSO, string);
  264.         SendClientMessage(id, INFO, string1);
  265.         SetPlayerHealth(playerid, 0);
  266.     }
  267.     else
  268.     {
  269.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  270.     }
  271.     return 1;
  272. }
  273.  
  274. CMD:announce(playerid, params[]) // ANNOUNCE
  275. {
  276.     if(IsPlayerAdmin(playerid))
  277.     {
  278.         new string[256];
  279.         new playername[MAX_PLAYER_NAME];
  280.        
  281.         if(isnull(params))  return SendClientMessage(playerid, INFO, "[ USO: ] /announce [texto]");
  282.         GetPlayerName(playerid, playername, sizeof(playername));
  283.         format(string, sizeof(string), "[ Administrador %s: ]  %s", playername, params);
  284.         SendClientMessageToAll(INFO2, string);
  285.     }
  286.     else
  287.     {
  288.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  289.     }
  290.     return 1;
  291. }
  292.  
  293. CMD:an(playerid, params[]) // (ANNOUNCE) AN
  294. {
  295.     if(IsPlayerAdmin(playerid))
  296.     {
  297.         new string[256];
  298.         new nomeadmin[MAX_PLAYER_NAME];
  299.        
  300.         if(isnull(params))  return SendClientMessage(playerid, INFO, "[ USO: ] /announce [texto]");
  301.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  302.         format(string, sizeof(string), "[ Administrador %s: ]  %s", nomeadmin, params);
  303.         SendClientMessageToAll(INFO2, string);
  304.     }
  305.     else
  306.     {
  307.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  308.     }
  309.     return 1;
  310. }
  311.  
  312. CMD:desarmar(playerid, params[]) // DESARMAR
  313. {
  314.     if(IsPlayerAdmin(playerid))
  315.     {
  316.         new id;
  317.         new nomeadmin[MAX_PLAYER_NAME];
  318.         new nomeplayer[MAX_PLAYER_NAME];
  319.         new string[128];
  320.         new string1[128];
  321.  
  322.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /desarmar [playerid]");
  323.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  324.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  325.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  326.         format(string, sizeof(string), "Desarmaste o jogador %s.", nomeplayer);
  327.         format(string1, sizeof(string1), "O Administrador %s desarmou-te.", nomeadmin);
  328.         SendClientMessage(playerid, SUCESSO, string);
  329.         SendClientMessage(id, INFO, string1);
  330.         ResetPlayerWeapons(id);
  331.     }
  332.     else
  333.     {
  334.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  335.     }
  336.     return 1;
  337. }
  338.  
  339. CMD:freeze(playerid, params[]) // FREEZE
  340. {
  341.     if(IsPlayerAdmin(playerid))
  342.     {
  343.         new id;
  344.         new string[128];
  345.         new string1[128];
  346.         new nomeadmin[MAX_PLAYER_NAME];
  347.         new nomeplayer[MAX_PLAYER_NAME];
  348.        
  349.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /freeze [playerid]");
  350.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  351.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  352.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  353.         format(string, sizeof(string), "Tu freezaste o jogador %s.", nomeplayer);
  354.         format(string1, sizeof(string1), "Foste congelado pelo Administrador %s.", nomeadmin);
  355.         SendClientMessage(playerid, SUCESSO, string);
  356.         SendClientMessage(id, INFO, string1);
  357.         TogglePlayerControllable(id, 0);
  358.     }
  359.     else
  360.     {
  361.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  362.     }
  363.     return 1;
  364. }
  365.  
  366. CMD:unfreeze(playerid, params[]) // UNFREEZE
  367. {
  368.     if(IsPlayerAdmin(playerid))
  369.     {
  370.         new id;
  371.         new string[128];
  372.         new string1[128];
  373.         new nomeadmin[MAX_PLAYER_NAME];
  374.         new nomeplayer[MAX_PLAYER_NAME];
  375.        
  376.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /unfreeze [playerid]");
  377.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  378.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  379.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  380.         format(string, sizeof(string), "Tu deste unfreeze ao jogador %s.", nomeplayer);
  381.         format(string1, sizeof(string1), "Foste descongelado pelo Administrador %s.", nomeadmin);
  382.         SendClientMessage(playerid, SUCESSO, string);
  383.         SendClientMessage(id, INFO, string1);
  384.         TogglePlayerControllable(id, 1);
  385.     }
  386.     else
  387.     {
  388.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  389.     }
  390.     return 1;
  391. }
  392.  
  393. CMD:kick(playerid, params[]) // KICK
  394. {
  395.     if(IsPlayerAdmin(playerid))
  396.     {
  397.         new string[128];
  398.         new string1[128];
  399.         new reason[32];
  400.         new nomeadmin[MAX_PLAYER_NAME];
  401.         new nomeplayer[MAX_PLAYER_NAME];
  402.        
  403.         if(sscanf(params, "us", kickid, reason)) return SendClientMessage(playerid, INFO,"[ USO: ] /kick [playerid] [razão]");
  404.         if(!IsPlayerConnected(kickid)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  405.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  406.         GetPlayerName(kickid, nomeplayer, sizeof(nomeplayer));
  407.         format(string, sizeof(string), "Tu kickaste o jogador %s.", nomeplayer);
  408.         format(string1, sizeof(string1), "Foste kickado pelo Administrador %s. Razão: %s", nomeadmin, reason);
  409.         SendClientMessage(playerid, SUCESSO, string);
  410.         SendClientMessage(kickid, INFO, string1);
  411.         SetTimer("KickTimer", 50, false);
  412.     }
  413.     else
  414.     {
  415.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  416.     }
  417.     return 1;
  418. }
  419.  
  420. public KickTimer()
  421. {
  422.     Kick(kickid);
  423.     return 1;
  424. }
  425.  
  426. CMD:ban(playerid, params[]) // BAN
  427. {
  428.     if(IsPlayerAdmin(playerid))
  429.     {
  430.         new string[128];
  431.         new string1[128];
  432.         new reason[32];
  433.         new nomeadmin[MAX_PLAYER_NAME];
  434.         new nomeplayer[MAX_PLAYER_NAME];
  435.        
  436.         if(sscanf(params, "us", banid, reason)) return SendClientMessage(playerid, INFO,"[ USO: ] /ban [playerid] [razão]");
  437.         if(!IsPlayerConnected(banid)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  438.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  439.         GetPlayerName(banid, nomeplayer, sizeof(nomeplayer));
  440.         format(string, sizeof(string), "Tu baniste o jogador %s.", nomeplayer);
  441.         format(string1, sizeof(string1), "Foste banido pelo Administrador %s. Razão: %s", nomeadmin, reason);
  442.         SendClientMessage(playerid, SUCESSO, string);
  443.         SendClientMessage(banid, INFO, string1);
  444.         SetTimer("BanTimer", 50, false);
  445.     }
  446.     else
  447.     {
  448.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  449.     }
  450.     return 1;
  451. }
  452.  
  453. public BanTimer()
  454. {
  455.     Ban(banid);
  456.     return 1;
  457. }
  458.  
  459. CMD:setmoney(playerid, params[]) // SETMONEY
  460. {
  461.     if(IsPlayerAdmin(playerid))
  462.     {
  463.         new id;
  464.         new string[128];
  465.         new string1[128];
  466.         new montante;
  467.         new nomeadmin[MAX_PLAYER_NAME];
  468.         new nomeplayer[MAX_PLAYER_NAME];
  469.        
  470.         if(sscanf(params, "ui", id, montante)) return SendClientMessage(playerid, INFO, "[ USO: ] /setmoney [playerid] [montante]");
  471.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  472.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  473.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  474.         format(string, sizeof(string), "Tu deste %d$ ao jogador %s.", montante, nomeplayer);
  475.         format(string1, sizeof(string1), "Recebeste %d$ do Administrador %s.", montante, nomeadmin);
  476.         SendClientMessage(playerid, SUCESSO, string);
  477.         SendClientMessage(id, INFO, string1);
  478.         GivePlayerMoney(id, montante);
  479.     }
  480.     else
  481.     {
  482.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  483.     }
  484.     return 1;
  485. }
  486.  
  487. CMD:curar(playerid, params[]) // CURAR
  488. {
  489.     if(IsPlayerAdmin(playerid))
  490.     {
  491.         new id;
  492.         new string[128];
  493.         new string1[128];
  494.         new nomeadmin[MAX_PLAYER_NAME];
  495.         new nomeplayer[MAX_PLAYER_NAME];
  496.        
  497.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /curar [playerid]");
  498.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  499.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  500.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  501.         format(string, sizeof(string), "Tu curaste o jogador %s.", nomeplayer);
  502.         format(string1, sizeof(string1), "Foste curado pelo Administrador %s.", nomeadmin);
  503.         SendClientMessage(playerid, SUCESSO, string);
  504.         SendClientMessage(id, INFO, string1);
  505.         SetPlayerHealth(id, 100);
  506.     }
  507.     else
  508.     {
  509.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  510.     }
  511.     return 1;
  512. }
  513.  
  514. CMD:darcolete(playerid, params[]) // DARCOLETE
  515. {
  516.     if(IsPlayerAdmin(playerid))
  517.     {
  518.         new id;
  519.         new string[128];
  520.         new string1[128];
  521.         new nomeadmin[MAX_PLAYER_NAME];
  522.         new nomeplayer[MAX_PLAYER_NAME];
  523.        
  524.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /darcolete [playerid]");
  525.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  526.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  527.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  528.         format(string, sizeof(string), "Tu deste colete ao jogador %s.", nomeplayer);
  529.         format(string1, sizeof(string1), "O Administrador %s deu-te colete.", nomeadmin);
  530.         SendClientMessage(playerid, SUCESSO, string);
  531.         SendClientMessage(id, INFO, string1);
  532.         SetPlayerArmour(id, 100);
  533.     }
  534.     else
  535.     {
  536.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  537.     }
  538.     return 1;
  539. }
  540.  
  541. CMD:aj(playerid, params[]) // AJ
  542. {
  543.     if(IsPlayerAdmin(playerid))
  544.     {
  545.         new id;
  546.        
  547.         if(checkaj[id] == 0)
  548.         {
  549.             new string[128];
  550.             new string1[128];
  551.             new reason[32];
  552.             new nomeadmin[MAX_PLAYER_NAME];
  553.             new nomeplayer[MAX_PLAYER_NAME];
  554.  
  555.             if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, INFO,"[ USO: ] /aj [playerid] [razão]");
  556.             if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  557.             GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  558.             GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  559.             format(string, sizeof(string), "Tu deste AJ ao jogador %s.", nomeplayer);
  560.             format(string1, sizeof(string1), "Foste de Admin Jail pelo Administrador %s e perdeste 1000$. Razão: %s", nomeadmin, reason);
  561.             SendClientMessage(playerid, SUCESSO, string);
  562.             SendClientMessage(id, INFO, string1);
  563.             SetPlayerPos(id, 1232.4852,640.1943,0.4801);
  564.             GivePlayerMoney(id, -1000);
  565.             checkaj[playerid] = 1;
  566.         }
  567.         else
  568.         {
  569.             new string[128];
  570.             new string1[128];
  571.             new reason[32];
  572.             new nomeadmin[MAX_PLAYER_NAME];
  573.             new nomeplayer[MAX_PLAYER_NAME];
  574.  
  575.             if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, INFO,"[ USO: ] /aj [playerid] [razão]");
  576.             if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  577.             GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  578.             GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  579.             format(string, sizeof(string), "Tu tiraste do AJ o jogador %s.", nomeplayer);
  580.             format(string1, sizeof(string1), "O Administrador %s tirou-te do Admin Jail. Razão: %s", nomeadmin, reason);
  581.             SendClientMessage(playerid, SUCESSO, string);
  582.             SendClientMessage(id, INFO, string1);
  583.             SetPlayerPos(id, -1560.8135,535.6848,7.8362);
  584.             checkaj[playerid] = 0;
  585.         }
  586.     }
  587.     else
  588.     {
  589.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  590.     }
  591.     return 1;
  592. }
  593.    
  594. CMD:restart(playerid, params[]) // RESTART
  595. {
  596.     if(IsPlayerAdmin(playerid))
  597.     {
  598.         new string[128];
  599.         new string1[128];
  600.         new nomeadmin[MAX_PLAYER_NAME];
  601.        
  602.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  603.         format(string, sizeof(string), "Tu deste Restart ao servidor.");
  604.         format(string1, sizeof(string1), "O servidor foi de Restart pelo Administrador %s.", nomeadmin);
  605.         SendClientMessage(playerid, SUCESSO, string);
  606.         SendClientMessageToAll(INFO2, string1);
  607.         SetTimer("RestartTimer", 50, false);
  608.     }
  609.     else
  610.     {
  611.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  612.     }
  613.     return 1;
  614. }
  615.  
  616. public RestartTimer()
  617. {
  618.     SendRconCommand("gmx");
  619.     return 1;
  620. }
  621.  
  622. CMD:spec(playerid, params[]) // SPEC
  623. {
  624.     if(IsPlayerAdmin(playerid))
  625.     {
  626.         new gSpectateID[MAX_PLAYERS];
  627.         new gSpectateType[MAX_PLAYERS];
  628.         new id;
  629.         new string[128];
  630.         new nomeplayer[MAX_PLAYER_NAME];
  631.        
  632.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /spec [playerid]");
  633.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  634.         GetPlayerName(playerid, nomeplayer, sizeof(nomeplayer));
  635.         format(string, sizeof(string), "Tu estás a specar o jogador %s.", nomeplayer);
  636.         SendClientMessage(playerid, SUCESSO, string);
  637.         TogglePlayerSpectating(playerid, 1);
  638.         PlayerSpectatePlayer(playerid, id);
  639.         SetPlayerInterior(playerid,GetPlayerInterior(id));
  640.         gSpectateID[playerid] = id;
  641.         gSpectateType[playerid] = ADMIN_SPEC_TYPE_PLAYER;
  642.     }
  643.     else
  644.     {
  645.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  646.     }
  647.     return 1;
  648. }
  649.  
  650. CMD:specoff(playerid, params[]) // SPECOFF
  651. {
  652.     if(IsPlayerAdmin(playerid))
  653.     {
  654.         new gSpectateID[MAX_PLAYERS];
  655.         new gSpectateType[MAX_PLAYERS];
  656.         new string[128];
  657.        
  658.         format(string, sizeof(string), "Paraste o Spectate ao jogador .");
  659.         SendClientMessage(playerid, SUCESSO, string);
  660.         TogglePlayerSpectating(playerid, 0);
  661.         gSpectateID[playerid] = INVALID_PLAYER_ID;
  662.         gSpectateType[playerid] = ADMIN_SPEC_TYPE_NONE;
  663.     }
  664.     else
  665.     {
  666.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  667.     }
  668.     return 1;
  669. }
  670.  
  671. CMD:goto(playerid, params[]) // GOTO
  672. {
  673.     if(IsPlayerAdmin(playerid))
  674.     {
  675.         new id;
  676.         new Float: x;
  677.         new Float: y;
  678.         new Float: z;
  679.         new string[128];
  680.         new string1[128];
  681.         new nomeadmin[MAX_PLAYER_NAME];
  682.         new nomeplayer[MAX_PLAYER_NAME];
  683.        
  684.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /goto [playerid]");
  685.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  686.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  687.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  688.         format(string, sizeof(string), "Teleportaste-te até ao jogador %s.", nomeplayer);
  689.         format(string1, sizeof(string1), "O Administrador %s foi até ti.", nomeadmin);
  690.         SendClientMessage(playerid, SUCESSO, string);
  691.         SendClientMessage(id, INFO, string1);
  692.         GetPlayerPos(id, x, y, z);
  693.         SetPlayerPos(playerid, x+1, y+1, z);
  694.     }
  695.     else
  696.     {
  697.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  698.     }
  699.     return 1;
  700. }
  701.  
  702. CMD:gethere(playerid, params[]) // GETHERE
  703. {
  704.     if(IsPlayerAdmin(playerid))
  705.     {
  706.         new id;
  707.         new Float: x;
  708.         new Float: y;
  709.         new Float: z;
  710.         new string[128];
  711.         new string1[128];
  712.         new nomeadmin[MAX_PLAYER_NAME];
  713.         new nomeplayer[MAX_PLAYER_NAME];
  714.  
  715.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /gethere [playerid]");
  716.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  717.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  718.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  719.         format(string, sizeof(string), "Trouxeste o jogador %s até ti.", nomeplayer);
  720.         format(string1, sizeof(string1), "O Administrador %s puxou-te até ele.", nomeadmin);
  721.         SendClientMessage(playerid, SUCESSO, string);
  722.         SendClientMessage(id, INFO, string1);
  723.         GetPlayerPos(playerid, x, y, z);
  724.         SetPlayerPos(id, x+1, y+1, z);
  725.     }
  726.     else
  727.     {
  728.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  729.     }
  730.     return 1;
  731. }
  732.  
  733. CMD:dararma(playerid, params[]) // DARARMA
  734. {
  735.     if(IsPlayerAdmin(playerid))
  736.     {
  737.         new id;
  738.         new idarma;
  739.         new balas;
  740.         new string[128];
  741.         new string1[128];
  742.         new nomeadmin[MAX_PLAYER_NAME];
  743.         new nomeplayer[MAX_PLAYER_NAME];
  744.  
  745.         if(sscanf(params, "uii", id, idarma, balas)) return SendClientMessage(playerid, INFO,"[ USO: ] /dararma [playerid] [id da arma] [balas]");
  746.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  747.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  748.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  749.         format(string, sizeof(string), "Tu deste ao jogador %s uma arma com o id %d, e com %d balas.", nomeplayer, idarma, balas);
  750.         format(string1, sizeof(string1), "O Administrador %s deu-te uma arma com o id %d com %d balas.", nomeadmin, idarma, balas);
  751.         SendClientMessage(playerid, SUCESSO, string);
  752.         SendClientMessage(id, INFO, string1);
  753.         GivePlayerWeapon(id, idarma, balas);
  754.     }
  755.     else
  756.     {
  757.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  758.     }
  759.     return 1;
  760. }
  761.  
  762. CMD:setscore(playerid, params[]) // SETSCORE
  763. {
  764.     if(IsPlayerAdmin(playerid))
  765.     {
  766.         new id;
  767.         new score;
  768.         new string[128];
  769.         new string1[128];
  770.         new nomeadmin[MAX_PLAYER_NAME];
  771.         new nomeplayer[MAX_PLAYER_NAME];
  772.        
  773.         if(sscanf(params, "ui", id, score)) return SendClientMessage(playerid, INFO,"[ USO: ] /setscore [playerid] [score]");
  774.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  775.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  776.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  777.         format(string, sizeof(string), "Tu deste ao jogador %s, %d de score.", nomeplayer, score);
  778.         format(string1, sizeof(string1), "O Administrador %s deu-te %d de score.", nomeadmin, score);
  779.         SendClientMessage(playerid, SUCESSO, string);
  780.         SendClientMessage(id, INFO, string1);
  781.         SetPlayerScore(id, score);
  782.     }
  783.     else
  784.     {
  785.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  786.     }
  787.     return 1;
  788. }
  789.  
  790. CMD:respawncarros(playerid, params[]) // RESPAWNCARROS
  791. {
  792.     if(IsPlayerAdmin(playerid))
  793.     {
  794.         new string[128];
  795.         new string1[128];
  796.         new nomeadmin[MAX_PLAYER_NAME];
  797.  
  798.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  799.         format(string, sizeof(string), "O Administrador %s começou o respawn de todos os carros (10 segundos).", nomeadmin);
  800.         format(string1, sizeof(string1), "Tu começaste um Respawn de todos os carros do servidor.");
  801.         SendClientMessageToAll(INFO2, string);
  802.         SendClientMessage(playerid, SUCESSO, string1);
  803.         SetTimer("RespawnCarrosTimer", 10000, false);
  804.     }
  805.     else
  806.     {
  807.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  808.     }
  809.     return 1;
  810. }
  811.  
  812. public RespawnCarrosTimer()
  813. {
  814.     new bool:vehicle[MAX_VEHICLES];
  815.     for(new j = 1; GetVehicleModel(j); ++j)
  816.     {
  817.         vehicle[j] = false;
  818.         for(new i, p = GetMaxPlayers(); i < p; ++i)
  819.         {
  820.             if(!IsPlayerInAnyVehicle(i) || !IsPlayerConnected(i)) continue;
  821.             if(IsPlayerInVehicle(i, j))
  822.             {
  823.                 vehicle[j] = true;
  824.                 break;
  825.             }
  826.         }
  827.         if(!vehicle[j]) SetVehicleToRespawn(j);
  828.     }
  829.     SendClientMessageToAll(INFO2, "Todos os carros foram de respawn.");
  830.     return 1;
  831. }
  832.  
  833. CMD:criarcarro(playerid, params[]) // CRIARCARRO
  834. {
  835.     if(IsPlayerAdmin(playerid))
  836.     {
  837.         new carmax;
  838.         new carmin;
  839.         carmax = 611;
  840.         carmin = 400;
  841.         new carid;
  842.         new string[128];
  843.         new Float:carrox;
  844.         new Float:carroy;
  845.         new Float:carroz;
  846.        
  847.         if(sscanf(params, "d", carid)) return SendClientMessage(playerid, INFO,"[ USO: ] /criarcarro [id do carro]");
  848.         if(carid > carmax || carid < carmin) return SendClientMessage(playerid, FAIL,"[ ERRO: ] Escolhe um ID entre 400 e 611.");
  849.         format(string, sizeof(string), "Criaste um carro com o id %d.", carid);
  850.         SendClientMessage(playerid, INFO, string);
  851.         GetPlayerPos(playerid, carrox, carroy, carroz);
  852.         CreateVehicle(carid, carrox+4, carroy, carroz, 0.2, 0, 0, 50);
  853.     }
  854.     else
  855.     {
  856.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  857.     }
  858.     return 1;
  859. }
  860.  
  861. CMD:apagarcarro(playerid, params[]) // APAGARCARRO
  862. {
  863.     if(IsPlayerAdmin(playerid))
  864.     {
  865.         new carid;
  866.         new string[128];
  867.  
  868.         if(sscanf(params, "d", carid)) return SendClientMessage(playerid, INFO,"[ USO: ] /apagarcarro [id do carro]");
  869.         format(string, sizeof(string), "Apagaste o carro com o id %d.", carid);
  870.         SendClientMessage(playerid, INFO, string);
  871.         DestroyVehicle(carid);
  872.     }
  873.     else
  874.     {
  875.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  876.     }
  877.     return 1;
  878. }
  879.  
  880. CMD:gotosf(playerid, params[]) // GOTOSF
  881. {
  882.     if(IsPlayerAdmin(playerid))
  883.     {
  884.         SetPlayerPos(playerid, -2029.3608,156.6678,28.8359);
  885.         SendClientMessage(playerid, INFO, "Foste para San Fierro");
  886.     }
  887.     else
  888.     {
  889.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  890.     }
  891.     return 1;
  892. }
  893.  
  894. CMD:gotols(playerid, params[]) // GOTOLS
  895. {
  896.     if(IsPlayerAdmin(playerid))
  897.     {
  898.         SetPlayerPos(playerid, 1909.8157,-1598.2068,14.3062);
  899.         SendClientMessage(playerid, INFO, "Foste para Los Santos");
  900.     }
  901.     else
  902.     {
  903.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  904.     }
  905.     return 1;
  906. }
  907.  
  908. CMD:gotolv(playerid, params[]) // GOTOLV
  909. {
  910.     if(IsPlayerAdmin(playerid))
  911.     {
  912.         SetPlayerPos(playerid, 1686.0610,1447.1038,10.7695);
  913.         SendClientMessage(playerid, INFO, "Foste para Las Venturas");
  914.     }
  915.     else
  916.     {
  917.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  918.     }
  919.     return 1;
  920. }
  921.  
  922. CMD:gotolb(playerid, params[]) // GOTOLB
  923. {
  924.     if(IsPlayerAdmin(playerid))
  925.     {
  926.         SetPlayerPos(playerid, -828.2004,1502.6024,19.5060);
  927.         SendClientMessage(playerid, INFO, "Foste para Las Barrancas");
  928.     }
  929.     else
  930.     {
  931.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  932.     }
  933.     return 1;
  934. }
  935.  
  936. CMD:gotofc(playerid, params[]) // GOTOFC
  937. {
  938.     if(IsPlayerAdmin(playerid))
  939.     {
  940.         SetPlayerPos(playerid, -204.7744,1119.2676,19.7422);
  941.         SendClientMessage(playerid, INFO, "Foste para Fort Carson");
  942.     }
  943.     else
  944.     {
  945.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  946.     }
  947.     return 1;
  948. }
  949.  
  950. CMD:gotoeq(playerid, params[]) // GOTOEQ
  951. {
  952.     if(IsPlayerAdmin(playerid))
  953.     {
  954.         SetPlayerPos(playerid, -1391.1229,2636.2307,55.9844);
  955.         SendClientMessage(playerid, INFO, "Foste para El Quebrados");
  956.     }
  957.     else
  958.     {
  959.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  960.     }
  961.     return 1;
  962. }
  963.  
  964. CMD:gotolp(playerid, params[]) // GOTOLP
  965. {
  966.     if(IsPlayerAdmin(playerid))
  967.     {
  968.         SetPlayerPos(playerid, -208.2770,2709.6096,62.6875);
  969.         SendClientMessage(playerid, INFO, "Foste para Las Pasayadas");
  970.     }
  971.     else
  972.     {
  973.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  974.     }
  975.     return 1;
  976. }
  977.  
  978. CMD:gotoap(playerid, params[]) // GOTOAP
  979. {
  980.     if(IsPlayerAdmin(playerid))
  981.     {
  982.         SetPlayerPos(playerid, -2137.3184,-2338.5107,30.6250);
  983.         SendClientMessage(playerid, INFO, "Foste para Angel Pine");
  984.     }
  985.     else
  986.     {
  987.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  988.     }
  989.     return 1;
  990. }
  991.  
  992. CMD:gotomc(playerid, params[]) // GOTOMC
  993. {
  994.     if(IsPlayerAdmin(playerid))
  995.     {
  996.         SetPlayerPos(playerid, -2331.1416,-1620.0380,483.7118);
  997.         SendClientMessage(playerid, INFO, "Foste para Mount Chiliad");
  998.     }
  999.     else
  1000.     {
  1001.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1002.     }
  1003.     return 1;
  1004. }
  1005.  
  1006. CMD:gotobb(playerid, params[]) // GOTOBB
  1007. {
  1008.     if(IsPlayerAdmin(playerid))
  1009.     {
  1010.         SetPlayerPos(playerid, 251.3808,-191.3105,1.5781);
  1011.         SendClientMessage(playerid, INFO, "Foste para BlueBerry");
  1012.     }
  1013.     else
  1014.     {
  1015.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1016.     }
  1017.     return 1;
  1018. }
  1019.  
  1020. CMD:gotodm(playerid, params[]) // GOTODM
  1021. {
  1022.     if(IsPlayerAdmin(playerid))
  1023.     {
  1024.         SetPlayerPos(playerid, 630.5290,-571.9767,16.3359);
  1025.         SendClientMessage(playerid, INFO, "Foste para Dillimore");
  1026.     }
  1027.     else
  1028.     {
  1029.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1030.     }
  1031.     return 1;
  1032. }
  1033.  
  1034. CMD:gotomg(playerid, params[]) // GOTOMG
  1035. {
  1036.     if(IsPlayerAdmin(playerid))
  1037.     {
  1038.         SetPlayerPos(playerid, 1290.6957,270.0407,19.5547);
  1039.         SendClientMessage(playerid, INFO, "Foste para Mountgomery");
  1040.     }
  1041.     else
  1042.     {
  1043.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1044.     }
  1045.     return 1;
  1046. }
  1047.  
  1048. CMD:gotopc(playerid, params[]) // GOTOPC
  1049. {
  1050.     if(IsPlayerAdmin(playerid))
  1051.     {
  1052.         SetPlayerPos(playerid, 2269.5032,-78.9296,26.5616);
  1053.         SendClientMessage(playerid, INFO, "Foste para Palomino Creek");
  1054.     }
  1055.     else
  1056.     {
  1057.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1058.     }
  1059.     return 1;
  1060. }
  1061.  
  1062. CMD:fixar(playerid, params[]) // FIXAR
  1063. {
  1064.     if(IsPlayerAdmin(playerid))
  1065.     {
  1066.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não estás em nenhum carro!");
  1067.         RepairVehicle(GetPlayerVehicleID(playerid));
  1068.         SendClientMessage(playerid, SUCESSO, "Reparaste o carro com sucesso!");
  1069.     }
  1070.     else
  1071.     {
  1072.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1073.     }
  1074.     return 1;
  1075. }
  1076.  
  1077. CMD:tocarmusicatodos(playerid, params[]) // TOCARMUSICA
  1078. {
  1079.     if(IsPlayerAdmin(playerid))
  1080.     {
  1081.         new string[128];
  1082.         new string1[128];
  1083.         new link[256];
  1084.         new nomeadmin[MAX_PLAYER_NAME];
  1085.  
  1086.         if(sscanf(params, "s", link)) return SendClientMessage(playerid, INFO,"[ USO: ] /tocarmusica [link direto]");
  1087.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1088.         format(string, sizeof(string), "Estás a tocar uma música para todo o servidor.");
  1089.         format(string1, sizeof(string1), "O Administrador %s está a tocar uma música para todo o servidor.", nomeadmin);
  1090.         SendClientMessage(playerid, SUCESSO, string);
  1091.         SendClientMessageToAll(INFO2, string1);
  1092.         for (new i = 0; i != MAX_PLAYERS; ++i)
  1093.         {
  1094.             PlayAudioStreamForPlayer(i, link);
  1095.         }
  1096.     }
  1097.     else
  1098.     {
  1099.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1100.     }
  1101.     return 1;
  1102. }
  1103.  
  1104. CMD:desligarmusicatodos(playerid, params[]) // DESLIGARMUSICA
  1105. {
  1106.     if(IsPlayerAdmin(playerid))
  1107.     {
  1108.         new string[128];
  1109.         new string1[128];
  1110.         new nomeadmin[MAX_PLAYER_NAME];
  1111.  
  1112.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1113.         format(string, sizeof(string), "Desligaste a música para todo o servidor.");
  1114.         format(string1, sizeof(string1), "O Administrador %s desligou a música de todo o servidor.", nomeadmin);
  1115.         SendClientMessage(playerid, SUCESSO, string);
  1116.         SendClientMessageToAll(INFO2, string1);
  1117.         for (new i = 0; i != MAX_PLAYERS; ++i)
  1118.         {
  1119.             StopAudioStreamForPlayer(i);
  1120.         }
  1121.     }
  1122.     else
  1123.     {
  1124.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1125.     }
  1126.     return 1;
  1127. }
  1128.  
  1129. CMD:setskin(playerid, params[]) // SETSKIN
  1130. {
  1131.     if(IsPlayerAdmin(playerid))
  1132.     {
  1133.         new id;
  1134.         new skinid;
  1135.         new string[128];
  1136.         new string1[128];
  1137.         new nomeadmin[MAX_PLAYER_NAME];
  1138.         new nomeplayer[MAX_PLAYER_NAME];
  1139.  
  1140.         if(sscanf(params, "ui", id, skinid)) return SendClientMessage(playerid, INFO,"[ USO: ] /setskin [playerid] [id da skin]");
  1141.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  1142.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1143.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  1144.         format(string, sizeof(string), "Tu setaste o jogador %s com a skin %d.", nomeplayer, skinid);
  1145.         format(string1, sizeof(string1), "O Administrador %s setou a tua skin para %d.", nomeadmin, skinid);
  1146.         SendClientMessage(playerid, SUCESSO, string);
  1147.         SendClientMessage(id, INFO, string1);
  1148.         SetPlayerSkin(id, skinid);
  1149.     }
  1150.     else
  1151.     {
  1152.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1153.     }
  1154.     return 1;
  1155. }
  1156.  
  1157. CMD:ip(playerid, params[]) // IP
  1158. {
  1159.     if(IsPlayerAdmin(playerid))
  1160.     {
  1161.         new id;
  1162.         new ip[32];
  1163.         new string[128];
  1164.         new nomeplayer[MAX_PLAYER_NAME];
  1165.  
  1166.         if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /ip [playerid]");
  1167.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  1168.         GetPlayerIp(playerid, ip, sizeof(ip));
  1169.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  1170.         format(string, sizeof(string), "O jogador %s tem o IP: %s.", nomeplayer, ip);
  1171.         SendClientMessage(playerid, SUCESSO, string);
  1172.     }
  1173.     else
  1174.     {
  1175.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1176.     }
  1177.     return 1;
  1178. }
  1179.  
  1180. CMD:setname(playerid, params[]) // SETNAME
  1181. {
  1182.     if(IsPlayerAdmin(playerid))
  1183.     {
  1184.         new id;
  1185.         new novonome[32];
  1186.         new string[128];
  1187.         new string1[128];
  1188.         new nomeadmin[MAX_PLAYER_NAME];
  1189.         new nomeplayer[MAX_PLAYER_NAME];
  1190.  
  1191.         if(sscanf(params, "us", id, novonome)) return SendClientMessage(playerid, INFO,"[ USO: ] /setname [playerid] [nome]");
  1192.         if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  1193.         GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1194.         GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  1195.         format(string, sizeof(string), "Tu mudaste o nome do jogador %s para %s.", nomeplayer, novonome);
  1196.         format(string1, sizeof(string1), "O Administrador %s mudou o teu nome para %s.", nomeadmin, novonome);
  1197.         SendClientMessage(playerid, SUCESSO, string);
  1198.         SendClientMessage(id, INFO, string1);
  1199.         SetPlayerName(id, novonome);
  1200.     }
  1201.     else
  1202.     {
  1203.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1204.     }
  1205.     return 1;
  1206. }
  1207.  
  1208. CMD:addnitro(playerid, params[]) // ADDNITRO
  1209. {
  1210.     if(IsPlayerAdmin(playerid))
  1211.     {
  1212.         new carro;
  1213.         carro = GetPlayerVehicleID(playerid);
  1214.        
  1215.         if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] Tu não estás em nenhum carro!");
  1216.         AddVehicleComponent(carro, 1010);
  1217.         SendClientMessage(playerid, SUCESSO, "Adicionaste nitro ao carro.");
  1218.     }
  1219.     else
  1220.     {
  1221.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1222.     }
  1223.     return 1;
  1224. }
  1225.  
  1226. CMD:coordevento(playerid, params[]) // COORDEVENTO
  1227. {
  1228.     if(IsPlayerAdmin(playerid))
  1229.     {
  1230.         if(checkevento[MAX_PLAYERS] == 0)
  1231.         {
  1232.             SendClientMessage(playerid, SUCESSO, "Tu setaste as coordenadas do evento.");
  1233.             GetPlayerPos(playerid, eventox, eventoy, eventoz);
  1234.         }
  1235.         else
  1236.         {
  1237.             SendClientMessage(playerid, FAIL, "[ ERRO: ] Já está a decorrer um evento!");
  1238.         }
  1239.     }
  1240.     else
  1241.     {
  1242.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1243.     }
  1244.     return 1;
  1245. }
  1246.  
  1247. CMD:criarevento(playerid, params[]) // CRIAREVENTO
  1248. {
  1249.     if(IsPlayerAdmin(playerid))
  1250.     {
  1251.         if(checkevento[MAX_PLAYERS] == 0)
  1252.         {
  1253.             if(eventox == 0 && eventoy == 0 && eventoz == 0)
  1254.             {
  1255.                 SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não setaste as coordenadas do evento ainda. (/coordevento)");
  1256.             }
  1257.             else
  1258.             {
  1259.                 new string[256];
  1260.                 new nomeadmin[MAX_PLAYER_NAME];
  1261.  
  1262.                 if(sscanf(params, "s", nomeevento)) return SendClientMessage(playerid, INFO,"[ USO: ] /criarevento [nome do evento]");
  1263.                 GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1264.                 format(string, sizeof(string), "O administrador %s começou um evento com o nome ' %s '. /entrarevento para entrares!", nomeadmin, nomeevento);
  1265.                 SendClientMessageToAll(INFO2, string);
  1266.                 checkevento[MAX_PLAYERS] = 1;
  1267.             }
  1268.         }
  1269.         else
  1270.         {
  1271.             SendClientMessage(playerid, FAIL, "[ ERRO: ] Já tens um evento criado! Faz /acabarevento para o terminares!");
  1272.         }
  1273.     }
  1274.     else
  1275.     {
  1276.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1277.     }
  1278.     return 1;
  1279. }
  1280.  
  1281. CMD:acabarevento(playerid, params[]) // ACABAREVENTO
  1282. {
  1283.     if(IsPlayerAdmin(playerid))
  1284.     {
  1285.         if(checkevento[MAX_PLAYERS] == 1)
  1286.         {
  1287.             new nomeadmin[MAX_PLAYER_NAME];
  1288.             new string[128];
  1289.        
  1290.             GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1291.             SendClientMessage(playerid, SUCESSO, "Terminaste o evento!");
  1292.             format(string, sizeof(string), "O Administrador %s terminou o evento ' %s '.", nomeadmin, nomeevento);
  1293.             SendClientMessageToAll(INFO2, string);
  1294.             eventox = 0;
  1295.             eventoy = 0;
  1296.             eventoz = 0;
  1297.             checkevento[MAX_PLAYERS] = 0;
  1298.             nomeevento = "0";
  1299.         }
  1300.         else
  1301.         {
  1302.             SendClientMessage(playerid, FAIL, "[ ERRO: ] Não há nenhum evento a decorrer.");
  1303.         }
  1304.     }
  1305.     else
  1306.     {
  1307.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1308.     }
  1309.     return 1;
  1310. }
  1311.  
  1312. CMD:kickarevento(playerid, params[]) // KICKAREVENTO
  1313. {
  1314.     if(IsPlayerAdmin(playerid))
  1315.     {
  1316.         if(checkevento[MAX_PLAYERS] == 1)
  1317.         {
  1318.             new id;
  1319.  
  1320.             if(sscanf(params, "u", id)) return SendClientMessage(playerid, INFO,"[ USO: ] /kickarevento [playerid]");
  1321.             if(checkplayerevento[id] == 1)
  1322.             {
  1323.                 new string[128];
  1324.                 new string1[128];
  1325.                 new nomeadmin[MAX_PLAYER_NAME];
  1326.                 new nomeplayer[MAX_PLAYER_NAME];
  1327.  
  1328.                 GetPlayerName(playerid, nomeadmin, sizeof(nomeadmin));
  1329.                 GetPlayerName(id, nomeplayer, sizeof(nomeplayer));
  1330.                 format(string, sizeof(string), "Tu kickaste o jogador %s do evento ' %s '.", nomeplayer, nomeevento);
  1331.                 format(string1, sizeof(string1), "Foste kickado do evento ' %s ' pelo Administrador.", nomeevento, nomeadmin);
  1332.                 SendClientMessage(playerid, SUCESSO, string);
  1333.                 SendClientMessage(playerid, INFO, string1);
  1334.  
  1335.                 checkplayerevento[id] = 0;
  1336.                 SetPlayerHealth(id, 0);
  1337.             }
  1338.             else
  1339.             {
  1340.                 SendClientMessage(playerid, FAIL, "[ ERRO: ] O jogador não está em nenhum evento!");
  1341.             }
  1342.         }
  1343.         else
  1344.         {
  1345.             SendClientMessage(playerid, FAIL, "[ ERRO: ] Não há nenhum evento a decorrer.");
  1346.         }
  1347.     }
  1348.     else
  1349.     {
  1350.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1351.     }
  1352.     return 1;
  1353. }
  1354.  
  1355. CMD:colocarbarreira(playerid, params[]) // COLOCARBARREIRA | 1424 - Barreira | 1238 - Cone | 1271 - Caixa | 1431- Caixa (2)
  1356. {
  1357.     if(IsPlayerAdmin(playerid))
  1358.     {
  1359.         new ido;
  1360.         new Float:jogadorx;
  1361.         new Float:jogadory;
  1362.         new Float:jogadorz;
  1363.  
  1364.         if(sscanf(params, "d", ido)) return SendClientMessage(playerid, INFO,"[ USO: ] /colocarbarreira [1 - CONE | 2 - BARREIRA | 3 - CAIXA | 4 - CAIXA (2)]");
  1365.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] Tu estás num veículo!");
  1366.         criados++;
  1367.         if(ido == 1)
  1368.         {
  1369.             GetPlayerPos(playerid, jogadorx, jogadory, jogadorz);
  1370.             SendClientMessage(playerid, SUCESSO, "Criaste um cone!");
  1371.             ObjetosCriados[criados] = CreateObject(1238, jogadorx, jogadory, jogadorz-0.70, 0.0, 0.0, 0.0);
  1372.         }
  1373.         else if( ido == 2)
  1374.         {
  1375.             GetPlayerPos(playerid, jogadorx, jogadory, jogadorz);
  1376.             SendClientMessage(playerid, SUCESSO, "Criaste uma barreira!");
  1377.             ObjetosCriados[criados] = CreateObject(1424, jogadorx, jogadory, jogadorz-0.70, 0.0, 0.0, 0.0);
  1378.         }
  1379.         else if( ido == 3)
  1380.         {
  1381.             GetPlayerPos(playerid, jogadorx, jogadory, jogadorz);
  1382.             SendClientMessage(playerid, SUCESSO, "Criaste uma caixa!");
  1383.             ObjetosCriados[criados] = CreateObject(1271, jogadorx, jogadory, jogadorz-0.70, 0.0, 0.0, 0.0);
  1384.         }
  1385.         else if( ido == 4)
  1386.         {
  1387.             GetPlayerPos(playerid, jogadorx, jogadory, jogadorz);
  1388.             SendClientMessage(playerid, SUCESSO, "Criaste uma caixa!");
  1389.             ObjetosCriados[criados] = CreateObject(1431, jogadorx, jogadory, jogadorz-0.70, 0.0, 0.0, 0.0);
  1390.         }
  1391.         else
  1392.         {
  1393.             SendClientMessage(playerid, FAIL, "[ ERRO: ] Objecto inválido!");
  1394.         }
  1395.     }
  1396.     else
  1397.     {
  1398.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1399.     }
  1400.     return 1;
  1401. }
  1402.  
  1403. CMD:apagarbarreiras(playerid, params[])
  1404. {
  1405.     if(IsPlayerAdmin(playerid))
  1406.     {
  1407.         criados = 0;
  1408.         for(new i; i < sizeof(ObjetosCriados); i++)
  1409.         {
  1410.             DestroyObject(ObjetosCriados[i]);
  1411.         }
  1412.     }
  1413.     else
  1414.     {
  1415.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não és Administrador.");
  1416.     }
  1417.     return 1;
  1418. }
  1419.  
  1420. CMD:entrarevento(playerid, params[]) // ENTRAREVENTO ( Para todos os players )
  1421. {
  1422.     if(checkevento[MAX_PLAYERS] == 1)
  1423.     {
  1424.         if(checkplayerevento[playerid] == 0)
  1425.         {
  1426.             new nomeplayer[MAX_PLAYER_NAME];
  1427.             new string[256];
  1428.        
  1429.             GetPlayerName(playerid, nomeplayer, sizeof(nomeplayer));
  1430.             format(string, sizeof(string), "O jogador %s entrou no evento ' %s '. Escreve /entrarevento para entrares também!", nomeplayer, nomeevento);
  1431.             SendClientMessage(playerid, INFO, "Tu entraste no evento. Aguarda a(s) regras / info do evento.");
  1432.             SetPlayerPos(playerid, eventox, eventoy, eventoz);
  1433.             checkplayerevento[playerid] = 1;
  1434.         }
  1435.         else
  1436.         {
  1437.             SendClientMessage(playerid, FAIL, "[ ERRO: ] Já estás no evento!");
  1438.         }
  1439.     }
  1440.     else
  1441.     {
  1442.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Não há nenhum evento a decorrer.");
  1443.     }
  1444.     return 1;
  1445. }
  1446.  
  1447. CMD:sairevento(playerid, params[]) // SAIREVENTO ( Para todos os players )
  1448. {
  1449.     if(checkplayerevento[playerid] == 1)
  1450.     {
  1451.         new nomeplayer[MAX_PLAYER_NAME];
  1452.         new string[256];
  1453.  
  1454.         GetPlayerName(playerid, nomeplayer, sizeof(nomeplayer));
  1455.         format(string, sizeof(string), "O jogador %s saiu do evento ' %s '.", nomeplayer, nomeevento);
  1456.         SendClientMessage(playerid, INFO, "Tu saíste do evento.");
  1457.         SetPlayerHealth(playerid, 0);
  1458.         GivePlayerMoney(playerid, 1000);
  1459.         checkplayerevento[playerid] = 0;
  1460.     }
  1461.     else
  1462.     {
  1463.         SendClientMessage(playerid, FAIL, "[ ERRO: ] Tu não estás em nenhum evento!");
  1464.     }
  1465.     return 1;
  1466. }
  1467.  
  1468. CMD:pcomandos(playerid, params[]) // PCOMANDOS ( Para todos os players )
  1469. {
  1470.     SendClientMessage(playerid, INFO2, "----------[ -- COMANDOS DE JOGADOR --]----------");
  1471.     SendClientMessage(playerid, INFO, "\n/pm   /admins   /entrarevento   /sairevento");
  1472.     return 1;
  1473. }
  1474.  
  1475. CMD:pm(playerid, params[]) // PM ( Para todos os players )
  1476. {
  1477.     new id;
  1478.     new string[128];
  1479.     new string1[128];
  1480.     new msg[128];
  1481.     new playername[MAX_PLAYER_NAME];
  1482.     new playername2[MAX_PLAYER_NAME];
  1483.    
  1484.     GetPlayerName(playerid, playername, sizeof(playername));
  1485.     GetPlayerName(id, playername2, sizeof(playername2));
  1486.     if(sscanf(params, "us", id, msg)) return SendClientMessage(playerid, INFO,"[ USO: ] /pm [playerid] [mensagem]");
  1487.     if(!IsPlayerConnected(id)) return SendClientMessage(playerid, FAIL,"[ ERRO: ] O player não está conectado.");
  1488.     format(string, sizeof(string), "PM enviada para %s: %s", playername2, msg);
  1489.     SendClientMessage(playerid, INFO2, string);
  1490.     format(string1, sizeof(string1), "PM recebida de %s: %s", playername, msg);
  1491.     SendClientMessage(id, INFO3, string1);
  1492.     return 1;
  1493. }
  1494.  
  1495. CMD:admins(playerid, params[]) // ADMINS ( Para todos os players )
  1496. {
  1497.     for(new i = 0; i < MAX_PLAYERS; i++)
  1498.     {
  1499.         if(IsPlayerConnected(i))
  1500.         {
  1501.             if(IsPlayerAdmin(i))
  1502.             {
  1503.                 new string[128];
  1504.                 new sendername[MAX_PLAYER_NAME];
  1505.                 GetPlayerName(i, sendername, sizeof(sendername));
  1506.                 format(string, sizeof(string), "Administradores Online: {FF0000}%s.", sendername);
  1507.                 SendClientMessage(playerid, INFO, string);
  1508.             }
  1509.         }
  1510.     }
  1511.     return 1;
  1512. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement