Guest User

AdminPorRcon V3.0 Samp FilterScript

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