Advertisement
Guest User

Sistema de Adminstração por RCON FilterScript SAMP

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