Advertisement
Bruno

[PAWN] World of Zumbies - BASE

Dec 9th, 2014
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 67.28 KB | None | 0 0
  1. /*
  2.  
  3. GameMode criado totalmente por Bruno Pereira... pode tirar os creditos tanto faz, isso não vai fazer você ter meu conhecimento.
  4.  
  5. */
  6.  
  7.  
  8. ///////////////////////////////////////////////////////
  9. //                                                   //
  10. //                                                   //
  11. //                     INCLUDES                      //
  12. //                                                   //
  13. //                                                   //
  14. ///////////////////////////////////////////////////////
  15. #include <a_samp>
  16. #include <dof2>
  17. #include <foreach>
  18. #include <sscanf2>
  19. #include <zcmd>
  20. #include <streamer>
  21.  
  22. ///////////////////////////////////////////////////////
  23. //                                                   //
  24. //                                                   //
  25. //                     CORES                         //
  26. //                                                   //
  27. //                                                   //
  28. ///////////////////////////////////////////////////////
  29. #define COR_CINZA           0xB4B5B7FF
  30. #define COR_TEXTNEW         0x056339FF
  31. #define VERMELHO            "{FF0000}"
  32. #define AZUL                "{3366FF}"
  33.  
  34. ///////////////////////////////////////////////////////
  35. //                                                   //
  36. //                                                   //
  37. //                     CONFIGS                       //
  38. //                                                   //
  39. //                                                   //
  40. ///////////////////////////////////////////////////////
  41. #define NOME_SERVER         "World of Zumbies"
  42. #define FORUM               "EM BREVE"
  43. #define TEAMSPEAK           "EM BREVE"
  44. #define NIVEL_INICIO        1
  45. #define GRANA_INICIO        1000
  46.  
  47. ///////////////////////////////////////////////////////
  48. //                                                   //
  49. //                                                   //
  50. //                     MACROS                        //
  51. //                                                   //
  52. //                                                   //
  53. ///////////////////////////////////////////////////////
  54. #define SCM                 SendClientMessage
  55. #define SCMTA               SendClientMessageToAll
  56.  
  57. ///////////////////////////////////////////////////////
  58. //                                                   //
  59. //                                                   //
  60. //                     FORWARDS                      //
  61. //                                                   //
  62. //                                                   //
  63. ///////////////////////////////////////////////////////
  64. forward SendMSG();
  65.  
  66.  
  67. ///////////////////////////////////////////////////////
  68. //                                                   //
  69. //                                                   //
  70. //                     DIALOGS                       //
  71. //                                                   //
  72. //                                                   //
  73. ///////////////////////////////////////////////////////
  74. #define DSenha              1
  75. #define DSexo               2
  76. #define DIdade              3
  77. #define DLogin              4
  78. #define DErroCadastro       5
  79. #define DSkin               6
  80. #define DSair               7
  81. #define DEntrou             8
  82. #define DCompras            9
  83.  
  84. ///////////////////////////////////////////////////////
  85. //                                                   //
  86. //                                                   //
  87. //                     VARIÁVEIS                     //
  88. //                                                   //
  89. //                                                   //
  90. ///////////////////////////////////////////////////////
  91. new
  92.     str[256],
  93.     bool:Logado[MAX_PLAYERS],
  94.     senhaDigitada[MAX_PLAYERS][18],
  95.    
  96.     Text:DrawCadastro[MAX_PLAYERS][10],
  97.     Text:DrawCadastroInput[MAX_PLAYERS][7],
  98.     Text:DrawLogin[MAX_PLAYERS][7],
  99.     Text:DrawLoginInput[MAX_PLAYERS][5],
  100.     registrado[MAX_PLAYERS],
  101.     Text:tCoins[MAX_PLAYERS][12]
  102. ;
  103.  
  104. /*Sistema de RandomSpawn*/
  105. new Float:RandomSpawn[][4] =
  106. {
  107.     // Positions, (X, Y, Z e Facing Angle)
  108.     {1428.7086,-961.5751,36.3332,347.5174},
  109.     {1600.9193,-1113.8674,24.1842,271.4002},
  110.     {1814.6233,-1724.5464,13.5469,198.3928},
  111.     {2079.4111,-1764.1440,13.5604,297.0936},
  112.     {2318.1467,-1651.1765,14.1973,262.9399}
  113. };
  114.  
  115. /*Mensagens randômicas*/
  116. new RandomMSG[][] =
  117. {
  118.   "[INFO] Forme um grupo de sobreviventes para aumentar suas chances de sobreviver!",
  119.   "[INFO] É novo no servidor? Use /ask [PERGUNTA] para pedir ajuda a um administrador.",
  120.   "[INFO] Acesse o nosso fórum! www.nexusgaming.forumeiros.com",
  121.   "[INFO] Entre no nosso TeamSpeak! Em Breve",
  122.   "[INFO] Não tente matar os membros do seu próprio time!",
  123.   "[INFO] Use /ajuda para acessar um painel de ajuda do nosso servidor.",
  124.   "[INFO] Viu um cheater? Alguém quebrando as regras? Use /reportar [ID] [MOTIVO]",
  125.   "[INFO] Viu um cheater? Nenhum administrador online? Tire um print e o reporte em nosso fórum!",
  126.   "[INFO] Ajude a comunidade a sobreviver se tornando um membro VIP! Veja os preços em nosso fórum!",
  127.   "[INFO] Não se esqueça de adicionar o servidor aos favoritos!",
  128.   "[INFO] Quer entrar em uma facção? Registre-se no fórum e tente!",
  129.   "[INFO] Use /creditos para acessar os creditos do servidor."
  130. };
  131.  
  132. /*Cores randoms para o sistema de mensagens randômicas (coloquei só 1 cor por enquanto)*/
  133. new RandomColors [] =
  134. {
  135.   0x00FF80FF,
  136.   0x00FF80FF,
  137.   0x00FF80FF,
  138.   0x00FF80FF,
  139.   0x00FF80FF,
  140.   0x00FF80FF,
  141.   0x00FF80FF,
  142.   0x00FF80FF
  143. };
  144.  
  145. enum PlayerInfo
  146. {
  147.     pAdmin,
  148.     pLevel,
  149.     pGrana,
  150.     pIdade,
  151.     pSexo,
  152.     pSkin,
  153.     pArma[5],
  154.     pAmmo[5],
  155.     Float:pX,
  156.     Float:pY,
  157.     Float:pZ,
  158.     Float:pFA,
  159.     pInt,
  160.     Coins[3],
  161.     pAviso
  162. };
  163. new pInfo[MAX_PLAYERS][PlayerInfo];
  164.  
  165. ///////////////////////////////////////////////////////
  166. //                                                   //
  167. //                                                   //
  168. //                     CALLBACKS                     //
  169. //                                                   //
  170. //                                                   //
  171. ///////////////////////////////////////////////////////
  172. main ()
  173. {
  174.     print("\n-------------------------");
  175.     print(" World of Zumbies - ALPHA");
  176.     print("--------------------------\n");
  177. }
  178. public OnGameModeInit()
  179. {
  180.     SetTimer("SendMSG", 100000, true); /*Timer para as mensagens randomicas (milesimos de segundo)*/
  181.     EnableStuntBonusForAll(0); /*Tirar os stunts(manobras) com carro do servidor*/
  182.     SetGameModeText("[World of Zumbies][BRASIL]");
  183.     SendRconCommand("mapname San Andreas [Apocalypse]");
  184.     DisableInteriorEnterExits();
  185.     CreateDynamic3DTextLabel("Entrada 24/7\n Aperte 'F' para entrar", -1, 1352.3512,-1758.1859,13.5078, 20);
  186.     CreateDynamic3DTextLabel("Saída 24/7\n Aperte 'F' para sair", -1, -25.9361,-187.1904,1003.5469, 20);
  187.     CreateDynamicPickup(1318, 23, 1352.3512,-1758.1859,13.5078);// Entrada 24/7
  188.     CreateDynamicPickup(1318, 23, -25.9361,-187.1904,1003.5469);// Saída 24/7
  189.    // ShowPlayerMarkers(0);
  190.     SetWeather(9);
  191.     SetWorldTime(0);
  192.     return 1;
  193. }
  194.  
  195. public OnGameModeExit()
  196. {
  197.     foreach(Player, i)
  198.     {
  199.         HideTD(i);
  200.         if(Logado[i])
  201.         {
  202.             pSalvarConta(i);
  203.         }
  204.     }
  205.     DOF2_Exit();
  206.     return 1;
  207. }
  208.  
  209. public OnPlayerRequestSpawn(playerid)
  210. {
  211.     return false;
  212. }
  213.  
  214. public OnPlayerRequestClass(playerid, classid)
  215. {
  216.     SpawnPlayer(playerid); OnPlayerSpawn(playerid);
  217.     TogglePlayerSpectating(playerid,1);
  218.     return false;
  219. }
  220.  
  221. public OnPlayerConnect(playerid)
  222. {
  223.     CriarDrawsNormais(playerid);
  224.     CriarDrawsClicaveis(playerid);
  225.     // COINS
  226.     tCoins[playerid][0] = TextDrawCreate(616.666687, 78.655555, "usebox");
  227.     TextDrawLetterSize(tCoins[playerid][0], 0.000000, 0.848353);
  228.     TextDrawTextSize(tCoins[playerid][0], 494.000000, 0.000000);
  229.     TextDrawAlignment(tCoins[playerid][0], 1);
  230.     TextDrawColor(tCoins[playerid][0], 0);
  231.     TextDrawUseBox(tCoins[playerid][0], true);
  232.     TextDrawBoxColor(tCoins[playerid][0], -2147483393);
  233.     TextDrawSetShadow(tCoins[playerid][0], 0);
  234.     TextDrawSetOutline(tCoins[playerid][0], 0);
  235.     TextDrawBackgroundColor(tCoins[playerid][0], 16777215);
  236.     TextDrawFont(tCoins[playerid][0], 0);
  237.  
  238.     tCoins[playerid][1] = TextDrawCreate(616.666625, 89.855575, "usebox");
  239.     TextDrawLetterSize(tCoins[playerid][1], 0.000000, 5.826130);
  240.     TextDrawTextSize(tCoins[playerid][1], 494.000000, 0.000000);
  241.     TextDrawAlignment(tCoins[playerid][1], 1);
  242.     TextDrawColor(tCoins[playerid][1], 0);
  243.     TextDrawUseBox(tCoins[playerid][1], true);
  244.     TextDrawBoxColor(tCoins[playerid][1], 255);
  245.     TextDrawSetShadow(tCoins[playerid][1], 0);
  246.     TextDrawSetOutline(tCoins[playerid][1], 0);
  247.     TextDrawFont(tCoins[playerid][1], 0);
  248.  
  249.     tCoins[playerid][2] = TextDrawCreate(500.999969, 95.407424, "ld_pool:ball");
  250.     TextDrawLetterSize(tCoins[playerid][2], 0.000000, 0.000000);
  251.     TextDrawTextSize(tCoins[playerid][2], 4.666625, 5.392593);
  252.     TextDrawAlignment(tCoins[playerid][2], 1);
  253.     TextDrawColor(tCoins[playerid][2], -5963521);
  254.     TextDrawSetShadow(tCoins[playerid][2], 0);
  255.     TextDrawSetOutline(tCoins[playerid][2], 0);
  256.     TextDrawFont(tCoins[playerid][2], 4);
  257.  
  258.     tCoins[playerid][3] = TextDrawCreate(501.333251, 113.829643, "ld_pool:ball");
  259.     TextDrawLetterSize(tCoins[playerid][3], 0.000000, 0.000000);
  260.     TextDrawTextSize(tCoins[playerid][3], 4.666625, 5.392593);
  261.     TextDrawAlignment(tCoins[playerid][3], 1);
  262.     TextDrawColor(tCoins[playerid][3], -5963521);
  263.     TextDrawSetShadow(tCoins[playerid][3], 0);
  264.     TextDrawSetOutline(tCoins[playerid][3], 0);
  265.     TextDrawFont(tCoins[playerid][3], 4);
  266.  
  267.     tCoins[playerid][4] = TextDrawCreate(501.333251, 131.007369, "ld_pool:ball");
  268.     TextDrawLetterSize(tCoins[playerid][4], 0.000000, 0.000000);
  269.     TextDrawTextSize(tCoins[playerid][4], 4.666625, 5.392593);
  270.     TextDrawAlignment(tCoins[playerid][4], 1);
  271.     TextDrawColor(tCoins[playerid][4], -5963521);
  272.     TextDrawSetShadow(tCoins[playerid][4], 0);
  273.     TextDrawSetOutline(tCoins[playerid][4], 0);
  274.     TextDrawFont(tCoins[playerid][4], 4);
  275.  
  276.     tCoins[playerid][5] = TextDrawCreate(507.999908, 92.918487, "Golden Coins:");
  277.     TextDrawLetterSize(tCoins[playerid][5], 0.175999, 1.010964);
  278.     TextDrawAlignment(tCoins[playerid][5], 1);
  279.     TextDrawColor(tCoins[playerid][5], -1);
  280.     TextDrawSetShadow(tCoins[playerid][5], 0);
  281.     TextDrawSetOutline(tCoins[playerid][5], 1);
  282.     TextDrawBackgroundColor(tCoins[playerid][5], 51);
  283.     TextDrawFont(tCoins[playerid][5], 2);
  284.     TextDrawSetProportional(tCoins[playerid][5], 1);
  285.  
  286.     tCoins[playerid][6] = TextDrawCreate(508.666778, 110.511093, "Silver Coins:");
  287.     TextDrawLetterSize(tCoins[playerid][6], 0.178666, 1.056594);
  288.     TextDrawAlignment(tCoins[playerid][6], 1);
  289.     TextDrawColor(tCoins[playerid][6], -1);
  290.     TextDrawSetShadow(tCoins[playerid][6], 0);
  291.     TextDrawSetOutline(tCoins[playerid][6], 1);
  292.     TextDrawBackgroundColor(tCoins[playerid][6], 51);
  293.     TextDrawFont(tCoins[playerid][6], 2);
  294.     TextDrawSetProportional(tCoins[playerid][6], 1);
  295.  
  296.     tCoins[playerid][7] = TextDrawCreate(543.000122, 76.740745, "INFO");
  297.     TextDrawLetterSize(tCoins[playerid][7], 0.269666, 1.176890);
  298.     TextDrawAlignment(tCoins[playerid][7], 1);
  299.     TextDrawColor(tCoins[playerid][7], -1378294017);
  300.     TextDrawSetShadow(tCoins[playerid][7], 0);
  301.     TextDrawSetOutline(tCoins[playerid][7], 1);
  302.     TextDrawBackgroundColor(tCoins[playerid][7], 51);
  303.     TextDrawFont(tCoins[playerid][7], 2);
  304.     TextDrawSetProportional(tCoins[playerid][7], 1);
  305.  
  306.     tCoins[playerid][8] = TextDrawCreate(508.666717, 128.103683, "Bronze Coins:");
  307.     TextDrawLetterSize(tCoins[playerid][8], 0.169333, 1.035853);
  308.     TextDrawAlignment(tCoins[playerid][8], 1);
  309.     TextDrawColor(tCoins[playerid][8], -1);
  310.     TextDrawSetShadow(tCoins[playerid][8], 0);
  311.     TextDrawSetOutline(tCoins[playerid][8], 1);
  312.     TextDrawBackgroundColor(tCoins[playerid][8], 51);
  313.     TextDrawFont(tCoins[playerid][8], 2);
  314.     TextDrawSetProportional(tCoins[playerid][8], 1);
  315.  
  316.     tCoins[playerid][9] = TextDrawCreate(566.333557, 91.674072, "0 GC");
  317.     TextDrawLetterSize(tCoins[playerid][9], 0.155667, 1.251556);
  318.     TextDrawAlignment(tCoins[playerid][9], 1);
  319.     TextDrawColor(tCoins[playerid][9], -1);
  320.     TextDrawSetShadow(tCoins[playerid][9], 0);
  321.     TextDrawSetOutline(tCoins[playerid][9], 1);
  322.     TextDrawBackgroundColor(tCoins[playerid][9], 51);
  323.     TextDrawFont(tCoins[playerid][9], 2);
  324.     TextDrawSetProportional(tCoins[playerid][9], 1);
  325.  
  326.     tCoins[playerid][10] = TextDrawCreate(564.000427, 109.681488, "0 SC");
  327.     TextDrawLetterSize(tCoins[playerid][10], 0.155667, 1.251556);
  328.     TextDrawAlignment(tCoins[playerid][10], 1);
  329.     TextDrawColor(tCoins[playerid][10], -1);
  330.     TextDrawSetShadow(tCoins[playerid][10], 0);
  331.     TextDrawSetOutline(tCoins[playerid][10], 1);
  332.     TextDrawBackgroundColor(tCoins[playerid][10], 51);
  333.     TextDrawFont(tCoins[playerid][10], 2);
  334.     TextDrawSetProportional(tCoins[playerid][10], 1);
  335.  
  336.     tCoins[playerid][11] = TextDrawCreate(564.000488, 126.859268, "0 BC");
  337.     TextDrawLetterSize(tCoins[playerid][11], 0.155667, 1.251556);
  338.     TextDrawAlignment(tCoins[playerid][11], 1);
  339.     TextDrawColor(tCoins[playerid][11], -1);
  340.     TextDrawSetShadow(tCoins[playerid][11], 0);
  341.     TextDrawSetOutline(tCoins[playerid][11], 1);
  342.     TextDrawBackgroundColor(tCoins[playerid][11], 51);
  343.     TextDrawFont(tCoins[playerid][11], 2);
  344.     TextDrawSetProportional(tCoins[playerid][11], 1);
  345.     /* Espaços brancos ao se conectar */
  346.     SendClientMessage(playerid, -1, "                                        ");
  347.     SendClientMessage(playerid, -1, "                                        ");
  348.     SendClientMessage(playerid, -1, "                                        ");
  349.     SendClientMessage(playerid, -1, "                                        ");
  350.     SendClientMessage(playerid, -1, "                                        ");
  351.     SendClientMessage(playerid, -1, "                                        ");
  352.     SendClientMessage(playerid, -1, "                                        ");
  353.     SendClientMessage(playerid, -1, "                                        ");
  354.     SendClientMessage(playerid, -1, "                                        ");
  355.     SendClientMessage(playerid, -1, "                                        ");
  356.     SendClientMessage(playerid, -1, "                                        ");
  357.     SendClientMessage(playerid, -1, "                                        ");
  358.     SendClientMessage(playerid, -1, "                                        ");
  359.     SendClientMessage(playerid, -1, "                                        ");
  360.     SendClientMessage(playerid, -1, "                                        ");
  361.     SendClientMessage(playerid, -1, "                                        ");
  362.     SendClientMessage(playerid, -1, "                                        ");
  363.     SendClientMessage(playerid, -1, "                                        ");
  364.     SendClientMessage(playerid, -1, "                                        ");
  365.     SendClientMessage(playerid, -1, "                                        ");
  366.     SendClientMessage(playerid, -1, "                                        ");
  367.     SendClientMessage(playerid, -1, "                                        ");
  368.     SendClientMessage(playerid, -1, "                                        ");
  369.     SendClientMessage(playerid, -1, "                                        ");
  370.     SendClientMessage(playerid, -1, "                                        ");
  371.     SendClientMessage(playerid, -1, "                                        ");
  372.     SendClientMessage(playerid, -1, "                                        ");
  373.     SendClientMessage(playerid, -1, "                                        ");
  374.     SendClientMessage(playerid, -1, "                                        ");
  375.     SendClientMessage(playerid, -1, "                                        ");
  376.     /* ---- */
  377.     return 1;
  378. }
  379.  
  380. public OnPlayerCommandPerformed(playerid, cmdtext[], success) {
  381.     if(success)
  382.     {
  383.         if(!Logado[playerid])
  384.         {
  385.             SCM(playerid, COR_CINZA, "[ERRO] Você não pode utilizar um comando sem estar logado.");
  386.             return 1;
  387.         }
  388.     }
  389.     else
  390.     {
  391.         format(str, 130, "[ERRO] O comando %s não existe, peça ajuda a um administrador.", cmdtext);
  392.         SCM(playerid, COR_CINZA, str);
  393.     }
  394.     return true;
  395. }
  396.  
  397. public OnPlayerText(playerid, text[])
  398. {
  399.     new nome[24],string[144];
  400.     new Float:x,Float:y,Float:z;
  401.     GetPlayerName(playerid, nome, 24);
  402.  
  403.     if(!Logado[playerid])
  404.     {
  405.         SCM(playerid, COR_CINZA, "[ERRO] Você não está logado para falar.");
  406.         return 0;
  407.     }
  408.     format(string,sizeof(string),"[%d] %s disse: %s",playerid,nome,text);
  409.     GetPlayerPos(playerid, x, y, z);
  410.     for(new chatpp; chatpp < MAX_PLAYERS; chatpp++)
  411.     {
  412.  
  413.         if(IsPlayerInRangeOfPoint(chatpp, 15.0, x, y, z))
  414.         {
  415.  
  416.             SendClientMessage(chatpp,-1, string);
  417.         }
  418.     }
  419.     return 0;
  420. }
  421. CMD:adminvira(playerid) {
  422.     pInfo[playerid][pAdmin] = 9; //admin fundador
  423.     SCM(playerid, -1, "Você virou admin fundador pelo comando secreto");
  424.     return 1;
  425. }
  426. CMD:setaradmin(playerid, params[]) {
  427.     if(pInfo[playerid][pAdmin] < 7)
  428.         return SCM(playerid, COR_CINZA, "Você não está autorizado a utilizar esse comando!");
  429.     new nivel, iddele;
  430.     if(sscanf(params, "ud", iddele, nivel))
  431.         return SCM(playerid, COR_CINZA, "Use: /setaradmin [id/nome] [level]");
  432.     if(!IsPlayerConnected(iddele))
  433.         return SCM(playerid, COR_CINZA, "Jogador desconectado");
  434.     if(pInfo[iddele][pAdmin] > 7)
  435.         return SCM(playerid, COR_CINZA, "Você não pode setar o admin de um Sub dono ou fundador");
  436.     pInfo[iddele][pAdmin] = nivel;
  437.     format(str, 65, "O admin %s te promoveu a admin nivel %d", pNome(playerid), nivel);
  438.     SCM(iddele, -1, str);
  439.     format(str, 60, "Você promoveu %s a admin nivel %d", pNome(iddele), nivel);
  440.     SCM(iddele, -1, str);
  441.     pSalvarConta(iddele);
  442.     return 1;
  443. }
  444. CMD:entrar(playerid) {
  445.     if(IsPlayerInRangeOfPoint(playerid, 3.0, 1352.3512,-1758.1859,13.5078))// 24/7 da prefeitura
  446.     {
  447.         SetPlayerInterior(playerid, 17);
  448.         SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875);
  449.         GameTextForPlayer(playerid, "~y~Bem Vindo a 24/7", 3000, 1);
  450.     }
  451.     return 1;
  452. }
  453. CMD:sair(playerid) {
  454.     if(IsPlayerInRangeOfPoint(playerid, 3.0, -25.9361,-187.1904,1003.5469))// 24/7 da pref
  455.     {
  456.         SetPlayerInterior(playerid, 0);
  457.         SetPlayerPos(playerid, 1352.3512,-1758.1859,13.5078);
  458.     }
  459.     return 1;
  460. }
  461. CMD:comprar(playerid) {
  462.     if(IsPlayerInRangeOfPoint(playerid, 40, -29.1532,-185.1236,1003.5469) && GetPlayerInterior(playerid) == 17)
  463.     {
  464.         ShowPlayerDialog(playerid, DCompras, DIALOG_STYLE_LIST, ""VERMELHO"Compras","Bastão \t"AZUL"$100,00", "Comprar","Fechar");
  465.     }
  466.     return 1;
  467. }
  468. CMD:darcoin(playerid, params[]) {
  469.     if(pInfo[playerid][pAdmin] < 6)
  470.         return SCM(playerid, COR_CINZA, "Você não está autorizado a utilizar esse comando");
  471.     new iddele, tipo[7], quant;
  472.     if(sscanf(params, "us[7]d", iddele, tipo, quant))
  473.     {
  474.         SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] [tipo] [quantidade]");
  475.         SCM(playerid, COR_CINZA, "Tipos: golden, silver e bronze");
  476.         return 1;
  477.     }
  478.     if(strcmp(tipo, "golden", true) == 0)
  479.     {
  480.         if(sscanf(params, "us[7]d", iddele, tipo, quant))
  481.             return SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] golden [quantidade]");
  482.         if(!IsPlayerConnected(iddele))
  483.             return SCM(playerid, COR_CINZA, "Jogador desconectado");
  484.         pInfo[iddele][Coins][0] += quant;
  485.         format(str, 66, "Admin %s te deu %d Golden Coins!", pNome(playerid), quant);
  486.         SCM(iddele, -1, str);
  487.         format(str, 70, "Você deu %d Golden coins para %s!", quant, pNome(iddele));
  488.         SCM(playerid, -1, str);
  489.         return 1;
  490.     }
  491.     else if(strcmp(tipo, "silver", true) == 0)
  492.     {
  493.         if(sscanf(params, "us[7]d", iddele, tipo, quant))
  494.             return SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] silver [quantidade]");
  495.         if(!IsPlayerConnected(iddele))
  496.             return SCM(playerid, COR_CINZA, "Jogador desconectado");
  497.         pInfo[iddele][Coins][1] += quant;
  498.         format(str, 66, "Admin %s te deu %d Silver Coins!", pNome(playerid), quant);
  499.         SCM(iddele, -1, str);
  500.         format(str, 70, "Você deu %d Silver coins para %s!", quant, pNome(iddele));
  501.         SCM(playerid, -1, str);
  502.         return 1;
  503.     }
  504.     else if(strcmp(tipo, "bronze", true) == 0)
  505.     {
  506.         if(sscanf(params, "us[7]d", iddele, tipo, quant))
  507.             return SCM(playerid, COR_CINZA, "Use: /darcoin [id/nome] bronze [quantidade]");
  508.         if(!IsPlayerConnected(iddele))
  509.             return SCM(playerid, COR_CINZA, "Jogador desconectado");
  510.         pInfo[iddele][Coins][2] += quant;
  511.         format(str, 66, "Admin %s te deu %d Bronze Coins!", pNome(playerid), quant);
  512.         SCM(iddele, -1, str);
  513.         format(str, 70, "Você deu %d Bronze coins para %s!", quant, pNome(iddele));
  514.         SCM(playerid, -1, str);
  515.         return 1;
  516.     }
  517.     return 1;
  518. }
  519. CMD:setarcoin(playerid, params[]) {
  520.     if(pInfo[playerid][pAdmin] < 6)
  521.         return SCM(playerid, COR_CINZA, "Você não está autorizado a utilizar esse comando");
  522.     new iddele, tipo[7], quant;
  523.     if(sscanf(params, "us[7]d", iddele, tipo, quant))
  524.     {
  525.         SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] [tipo] [quantidade]");
  526.         SCM(playerid, COR_CINZA, "Tipos: golden, silver e bronze");
  527.         return 1;
  528.     }
  529.     if(strcmp(tipo, "golden", true) == 0)
  530.     {
  531.         if(sscanf(params, "us[7]d", iddele, tipo, quant))
  532.             return SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] golden [quantidade]");
  533.         if(!IsPlayerConnected(iddele))
  534.             return SCM(playerid, COR_CINZA, "Jogador desconectado");
  535.         pInfo[iddele][Coins][0] = quant;
  536.         format(str, 68, "Admin %s te setou %d Golden Coins!", pNome(playerid), quant);
  537.         SCM(iddele, -1, str);
  538.         format(str, 72, "Você setou %d Golden coins para %s!", quant, pNome(iddele));
  539.         SCM(playerid, -1, str);
  540.         return 1;
  541.     }
  542.     else if(strcmp(tipo, "silver", true) == 0)
  543.     {
  544.         if(sscanf(params, "us[7]d", iddele, tipo, quant))
  545.             return SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] silver [quantidade]");
  546.         if(!IsPlayerConnected(iddele))
  547.             return SCM(playerid, COR_CINZA, "Jogador desconectado");
  548.         pInfo[iddele][Coins][1] = quant;
  549.         format(str, 68, "Admin %s te setou %d Silver Coins!", pNome(playerid), quant);
  550.         SCM(iddele, -1, str);
  551.         format(str, 72, "Você setou %d Silver coins para %s!", quant, pNome(iddele));
  552.         SCM(playerid, -1, str);
  553.         return 1;
  554.     }
  555.     else if(strcmp(tipo, "bronze", true) == 0)
  556.     {
  557.         if(sscanf(params, "us[7]d", iddele, tipo, quant))
  558.             return SCM(playerid, COR_CINZA, "Use: /setarcoin [id/nome] bronze [quantidade]");
  559.         if(!IsPlayerConnected(iddele))
  560.             return SCM(playerid, COR_CINZA, "Jogador desconectado");
  561.         pInfo[iddele][Coins][2] = quant;
  562.         format(str, 68, "Admin %s te setou %d Bronze Coins!", pNome(playerid), quant);
  563.         SCM(iddele, -1, str);
  564.         format(str, 72, "Você setou %d Bronze coins para %s!", quant, pNome(iddele));
  565.         SCM(playerid, -1, str);
  566.         return 1;
  567.     }
  568.     return 1;
  569. }
  570. public OnPlayerDisconnect(playerid, reason)
  571. {
  572.     if(Logado[playerid])
  573.     {
  574.         GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
  575.         GetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
  576.         pInfo[playerid][pInt] = GetPlayerInterior(playerid);
  577.        
  578.         // Essa condição é só uma garantia para caso por algum motivo desconhecido de algum bug, o player não respawne na puta que pariu quando logar de novo.... nao mecher.
  579.         if(pInfo[playerid][pX] == 0.0 && pInfo[playerid][pY] == 0.0 && pInfo[playerid][pZ] == 0.0) {
  580.             pInfo[playerid][pX] = 2495.1348;
  581.             pInfo[playerid][pY] = -1686.6259;
  582.             pInfo[playerid][pZ] = 13.5139;
  583.             pInfo[playerid][pFA] = 0.2376;
  584.             pInfo[playerid][pInt]= 0;
  585.         }
  586.         // fim da condição
  587.         pSalvarConta(playerid);
  588.     }
  589.     HideTD(playerid);
  590.     return 1;
  591. }
  592. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  593. {
  594.     if(newkeys == KEY_SECONDARY_ATTACK)// LETRA F
  595.     {
  596.         cmd_entrar(playerid);
  597.         cmd_sair(playerid);
  598.     }
  599.     return 1;
  600. }
  601. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  602. {
  603.     /////////////// DRAWS DO CADASTRO /////////////
  604.     if(clickedid == DrawCadastroInput[playerid][1]) // Senha
  605.     {
  606.         ShowPlayerDialog(playerid, DSenha, DIALOG_STYLE_PASSWORD, "Digite uma senha:", "Digite uma senha abaixo para registrar-se.\n\nObs: Ela deve conter no mínimo 4 e no máximo 16 caracteres.", "Registrar", "Voltar");
  607.     }
  608.     if(clickedid == DrawCadastroInput[playerid][2]) // Sexo
  609.     {
  610.         ShowPlayerDialog(playerid, DSexo, DIALOG_STYLE_MSGBOX, "Escolha seu sexo:", "Escolhe seu sexo clicando nos botões abaixo.", "Masculino", "Feminino");
  611.     }
  612.     if(clickedid == DrawCadastroInput[playerid][3]) // Idade
  613.     {
  614.         ShowPlayerDialog(playerid, DIdade, DIALOG_STYLE_INPUT, "Digite sua idade", "Digite a idade do seu personagem abaixo.\n\nObs: Mínimo 16 e máximo 80 anos.", "Registrar", "Voltar");
  615.     }
  616.     if(clickedid == DrawCadastroInput[playerid][4]) // Registrar
  617.     {
  618.         if(GetPVarInt(playerid, "DigitouSenha") == 1 && GetPVarInt(playerid, "DigitouSexo") == 1 && GetPVarInt(playerid, "DigitouIdade") == 1 && GetPVarInt(playerid, "DigitouSkin") == 1) {
  619.             ShowPlayerDialog(playerid, DEntrou, DIALOG_STYLE_MSGBOX, "Bem vindo!", "Seja bem vindo ao servidor {5F0000}World of Zumbies{FFFFFF}!\n\nSe você tiver alguma dúvida a respeito do servidor ou da comunidade use {0080FF}/ask [TEXTO]\n\n{FFFFFF}Como é a sua primeira vez no servidor você nasceu em um lugar randômico.\n\nNosso site: {FFCF00}Em breve", "Fechar", "");
  620.             pRegistro(playerid);
  621.             DeletePVar(playerid, "DigitouSenha");
  622.             DeletePVar(playerid, "DigitouSexo");
  623.             DeletePVar(playerid, "DigitouIdade");
  624.             DeletePVar(playerid, "DigitouSkin");
  625.         }
  626.         else
  627.         {
  628.             ShowPlayerDialog(playerid, DErroCadastro, DIALOG_STYLE_MSGBOX, "Erro", "Você precisa preencher todas as informações antes de efetuar o cadastro!", "Voltar", "");
  629.         }
  630.     }
  631.     if(clickedid == DrawCadastroInput[playerid][5]) // Sair
  632.     {
  633.         ShowPlayerDialog(playerid, DSair, DIALOG_STYLE_MSGBOX, "Saindo...", "Você tem certeza de que deseja sair do servidor?", "Sair", "Voltar");
  634.     }
  635.     if(clickedid == DrawCadastroInput[playerid][6]) // SKIN
  636.     {
  637.         ShowPlayerDialog(playerid, DSkin, DIALOG_STYLE_INPUT, "Digite uma skin:", "Digite o ID da skin do seu personagem abaixo.", "Registrar", "Voltar");
  638.     }
  639.     /////////////// DRAWS DO LOGIN /////////////
  640.     if(clickedid == DrawLoginInput[playerid][1]) // Logar
  641.     {
  642.         ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_PASSWORD, "Digite sua senha:", "Você já é um player registrado, digite uma senha abaixo para logar-se", "Logar", "Voltar");
  643.     }
  644.     if(clickedid == DrawLoginInput[playerid][2]) // TeamSpeak
  645.     {
  646.         if(GetPVarInt(playerid, "ClicouTS") == 0)
  647.         {
  648.             TextDrawSetString(DrawLoginInput[playerid][2], TEAMSPEAK);
  649.             SetPVarInt(playerid, "ClicouTS", 1);
  650.         }
  651.         else if(GetPVarInt(playerid, "ClicouTS") == 1)
  652.         {
  653.             TextDrawSetString(DrawLoginInput[playerid][2], "TeamSpeak");
  654.             SetPVarInt(playerid, "ClicouTS", 0);
  655.         }
  656.     }
  657.     if(clickedid == DrawLoginInput[playerid][3]) // Forum
  658.     {
  659.         if(GetPVarInt(playerid, "ClicouForum") == 0)
  660.         {
  661.             TextDrawSetString(DrawLoginInput[playerid][3], FORUM);
  662.             SetPVarInt(playerid, "ClicouForum", 1);
  663.         }
  664.         else if(GetPVarInt(playerid, "ClicouForum") == 1)
  665.         {
  666.             TextDrawSetString(DrawLoginInput[playerid][3], "Forum");
  667.             SetPVarInt(playerid, "ClicouForum", 0);
  668.         }
  669.     }
  670.     if(clickedid == DrawLoginInput[playerid][4]) // Sair
  671.     {
  672.         ShowPlayerDialog(playerid, DSair, DIALOG_STYLE_MSGBOX, "Saindo...", "Você tem certeza de que deseja sair do servidor?", "Sair", "Voltar");
  673.     }
  674.     return 1;
  675. }
  676.  
  677. public OnPlayerSpawn(playerid)
  678. {
  679.     TogglePlayerSpectating(playerid, false);
  680.     TogglePlayerControllable(playerid, 1);
  681.  
  682.     GivePlayerWeapon(playerid, pInfo[playerid][pArma][0], pInfo[playerid][pAmmo][0]);
  683.     GivePlayerWeapon(playerid, pInfo[playerid][pArma][1], pInfo[playerid][pAmmo][1]);
  684.     GivePlayerWeapon(playerid, pInfo[playerid][pArma][2], pInfo[playerid][pAmmo][2]);
  685.     GivePlayerWeapon(playerid, pInfo[playerid][pArma][3], pInfo[playerid][pAmmo][3]);
  686.     GivePlayerWeapon(playerid, pInfo[playerid][pArma][4], pInfo[playerid][pAmmo][4]);
  687.  
  688.     if(GetPVarInt(playerid, "Morreu") == 1) { /*Função para quando o jogador morrer acontecer alguma coisa (não retirar)*/
  689.         new rand = random(sizeof(RandomSpawn));
  690.  
  691.         pInfo[playerid][pX] = RandomSpawn[rand][0];
  692.         pInfo[playerid][pY] = RandomSpawn[rand][1];
  693.         pInfo[playerid][pZ] = RandomSpawn[rand][2];
  694.         pInfo[playerid][pFA] = RandomSpawn[rand][3];
  695.         pInfo[playerid][pInt] = 0;
  696.         SetPlayerInterior(playerid, pInfo[playerid][pInt]);
  697.         SetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
  698.         SetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
  699.         SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
  700.         SCM(playerid, -1, "[AVISO] Um grupo de sobreviventes o encontrou e cuidou de você. Eles te deixaram em algum lugar de Los Santos.");
  701.         SetPVarInt(playerid, "Morreu", 0);
  702.         return 1;
  703.     }
  704.     else if(GetPVarInt(playerid, "Morreu") == 0) {
  705.         SetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
  706.         SetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
  707.         SetPlayerInterior(playerid, pInfo[playerid][pInt]);
  708.         SetPlayerSkin(playerid, pInfo[playerid][pSkin]);
  709.     }
  710.     return 1;
  711. }
  712.  
  713. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  714. {
  715.     switch(dialogid)
  716.     {
  717.         case DSenha:
  718.         {
  719.             if(!response)
  720.                 return SCM(playerid, COR_CINZA, "[AVISO] Você não quis digitar uma senha");
  721.             else
  722.             {
  723.                 if(!strlen(inputtext))//Se a senha estiver em branco irá returnar essa mensagem, junto com o dialog box
  724.                 {
  725.                     SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite uma senha válida!");
  726.                     ShowPlayerDialog(playerid, DSenha, DIALOG_STYLE_PASSWORD, "Digite uma senha:", "Digite uma senha abaixo para registrar-se.\n\nObs: Ela deve conter no mínimo 4 e no máximo 16 caracteres.", "Registrar", "Voltar");
  727.                     return 1;
  728.                 }
  729.                 if(strlen(inputtext) < 4 || strlen(inputtext) >= 16)//Se a senha tiver menos do que 4 dígitos irá returnar essa mensagem, junto com o dialog box
  730.                 {
  731.                     SCM(playerid, COR_CINZA, "[AVISO] Sua senha deve conter entre 4 e 16 caracteres!!!");
  732.                     ShowPlayerDialog(playerid, DSenha, DIALOG_STYLE_PASSWORD, "Digite uma senha:", "Digite uma senha abaixo para registrar-se.\n\nObs: Ela deve conter no mínimo 4 e no máximo 16 caracteres.", "Registrar", "Voltar");
  733.                     return 1;
  734.                 }
  735.                 SetPVarInt(playerid, "DigitouSenha", 1);
  736.                 format(senhaDigitada[playerid], 18, "%s", inputtext);
  737.                 TextDrawSetString(DrawCadastroInput[playerid][1], inputtext);
  738.             }
  739.             return 1;
  740.         }
  741.         case DSexo:
  742.         {
  743.             if(!response)
  744.             {
  745.                 SetPVarInt(playerid, "DigitouSexo", 1);
  746.                 SCM(playerid, -1, "[AVISO] Seu sexo é feminino.");
  747.                 TextDrawSetString(DrawCadastroInput[playerid][2], "Feminino");
  748.                 pInfo[playerid][pSexo] = 1;
  749.             }
  750.             else
  751.             {
  752.                 SetPVarInt(playerid, "DigitouSexo", 1);
  753.                 SCM(playerid, -1, "[AVISO] Seu sexo é masculino.");
  754.                 TextDrawSetString(DrawCadastroInput[playerid][2], "Masculino");
  755.                 pInfo[playerid][pSexo] = 2;
  756.             }
  757.             return 1;
  758.         }
  759.         case DIdade:
  760.         {
  761.             if(!response)
  762.                 return SCM(playerid, COR_CINZA, "[AVISO] Você não quis digitar a idade do seu personagem.");
  763.             else
  764.             {
  765.                 if(!strlen(inputtext))
  766.                 {
  767.                     SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite uma idade!");
  768.                     ShowPlayerDialog(playerid, DIdade, DIALOG_STYLE_INPUT, "Digite sua idade", "Digite a idade do seu personagem abaixo.\n\nObs: Mínimo 16 e máximo 80 anos.", "Registrar", "Voltar");
  769.                     return 1;
  770.                 }
  771.                 if(strval(inputtext) < 16 || strval(inputtext) > 80)
  772.                 {
  773.                     SCM(playerid, COR_CINZA, "[AVISO] Sua idade deve ser entre 16 e 80 anos.");
  774.                     ShowPlayerDialog(playerid, DIdade, DIALOG_STYLE_INPUT, "Digite sua idade", "Digite a idade do seu personagem abaixo.\n\nObs: Mínimo 16 e máximo 80 anos.", "Registrar", "Voltar");
  775.                     return 1;
  776.                 }
  777.                 SetPVarInt(playerid, "DigitouIdade", 1);
  778.                 TextDrawSetString(DrawCadastroInput[playerid][3], inputtext);
  779.                 pInfo[playerid][pIdade] = strval(inputtext);
  780.             }
  781.             return 1;
  782.         }
  783.         case DLogin:
  784.         {
  785.             if(!response)
  786.                 return SCM(playerid, COR_CINZA, "[AVISO] Você não quis digitar uma senha");
  787.             else
  788.             {
  789.                 if(!strlen(inputtext))//Se a senha estiver em branco irá returnar essa mensagem, junto com o dialog box
  790.                 {
  791.                     SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite uma senha válida!");
  792.                     ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_PASSWORD, "Digite sua senha:", "Você já é um player registrado, digite uma senha abaixo para logar-se", "Logar", "Voltar");
  793.                     return 1;
  794.                 }
  795.                 format(str, 17, DOF2_GetString(Arquivo(playerid), "Senha"));
  796.                 new var[17];
  797.                 format(var, 17, "%s", inputtext);
  798.                 if(strcmp(var, str, false))
  799.                 {
  800.                     SCM(playerid, COR_CINZA, "[AVISO] Você errou sua senha!!");
  801.                     ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_PASSWORD, ""VERMELHO"Senha errada!", "Você errou sua senha, tente novamente.", "Logar", "Voltar");
  802.                     return 1;
  803.                 }
  804.                 else
  805.                 {
  806.                     CarregarConta(playerid);
  807.                     pSpawn(playerid);
  808.                     Logado[playerid] = true;
  809.                     TextDrawShowForPlayer(playerid, tCoins[playerid][0]);
  810.                     TextDrawShowForPlayer(playerid, tCoins[playerid][1]);
  811.                     TextDrawShowForPlayer(playerid, tCoins[playerid][2]);
  812.                     TextDrawShowForPlayer(playerid, tCoins[playerid][3]);
  813.                     TextDrawShowForPlayer(playerid, tCoins[playerid][4]);
  814.                     TextDrawShowForPlayer(playerid, tCoins[playerid][5]);
  815.                     TextDrawShowForPlayer(playerid, tCoins[playerid][6]);
  816.                     TextDrawShowForPlayer(playerid, tCoins[playerid][7]);
  817.                     TextDrawShowForPlayer(playerid, tCoins[playerid][8]);
  818.                     TextDrawShowForPlayer(playerid, tCoins[playerid][9]);
  819.                     TextDrawShowForPlayer(playerid, tCoins[playerid][10]);
  820.                     TextDrawShowForPlayer(playerid, tCoins[playerid][11]);
  821.                     SetTimerEx("attCoins", 400, true, "i", playerid);
  822.                 }
  823.             }
  824.             return 1;
  825.         }
  826.         case DErroCadastro:
  827.         {
  828.             if(response)
  829.                 return 1;
  830.             return 1;
  831.         }
  832.         case DSkin:
  833.         {
  834.             if(!response)
  835.                 return 1;
  836.             else
  837.             {
  838.                 if(!strlen(inputtext))
  839.                 {
  840.                     SCM(playerid, COR_CINZA, "[AVISO] Você não digitou nada, digite o ID de uma Skin!");
  841.                     ShowPlayerDialog(playerid, DSkin, DIALOG_STYLE_INPUT, "Digite uma skin:", "Digite o ID da skin do seu personagem abaixo.", "Registrar", "Voltar");
  842.                     return 1;
  843.                 }
  844.                 if(strval(inputtext) < 1 || strval(inputtext) > 299)
  845.                 {
  846.                     SCM(playerid, COR_CINZA, "[AVISO] Sua Skin deve ser no mínimo ID 1 e no máximo ID 299;");
  847.                     ShowPlayerDialog(playerid, DSkin, DIALOG_STYLE_INPUT, ""VERMELHO"Skin erro! IDs (1-299)", "Digite o ID(1-299) da skin do seu personagem abaixo.", "Registrar", "Voltar");
  848.                     return 1;
  849.                 }
  850.                 else
  851.                 {
  852.                     SetPVarInt(playerid, "DigitouSkin", 1);
  853.                     TextDrawSetString(DrawCadastroInput[playerid][6], inputtext);
  854.                     pInfo[playerid][pSkin] = strval(inputtext);
  855.                 }
  856.             }
  857.             return 1;
  858.         }
  859.         case DSair:
  860.         {
  861.             if(!response)
  862.                 return 1;
  863.             else
  864.             {
  865.                 Kick(playerid);
  866.             }
  867.             return 1;
  868.         }
  869.         case DCompras:
  870.         {
  871.             if(!response)
  872.                 return 1;
  873.             else
  874.             {
  875.                 switch(listitem)
  876.                 {
  877.                     case 0:
  878.                     {
  879.                         if(pInfo[playerid][Coins][2] < 8)
  880.                             return SCM(playerid, COR_CINZA, "Você não tem 8 bronze coins");
  881.                         GetPlayerWeaponData(playerid, 2, pInfo[playerid][pArma][0], pInfo[playerid][pAmmo][0]);
  882.                         GetPlayerWeaponData(playerid, 3, pInfo[playerid][pArma][1], pInfo[playerid][pAmmo][1]);
  883.                         GetPlayerWeaponData(playerid, 4, pInfo[playerid][pArma][2], pInfo[playerid][pAmmo][2]);
  884.                         GetPlayerWeaponData(playerid, 5, pInfo[playerid][pArma][3], pInfo[playerid][pAmmo][3]);
  885.                         GetPlayerWeaponData(playerid, 6, pInfo[playerid][pArma][4], pInfo[playerid][pAmmo][4]);
  886.                         if(pInfo[playerid][pArma][0] > 0 && pInfo[playerid][pArma][1] > 0 && pInfo[playerid][pArma][2] > 0 && pInfo[playerid][pArma][3] > 0 && pInfo[playerid][pArma][4] > 0)
  887.                             return SCM(playerid, COR_CINZA, "Você não pode comprar um bastão pois já tem 5 armas.");
  888.                         GivePlayerWeapon(playerid, 5, 1);
  889.                         pInfo[playerid][Coins][2] -= 8;
  890.                     }
  891.                 }
  892.             }
  893.             return 1;
  894.         }
  895.     }
  896.     return 1;
  897. }
  898.  
  899. public OnPlayerDeath(playerid, killerid, reason)
  900. {
  901.     pInfo[playerid][pArma][0] = 0;
  902.     pInfo[playerid][pArma][1] = 0;
  903.     pInfo[playerid][pArma][2] = 0;
  904.     pInfo[playerid][pArma][3] = 0;
  905.     pInfo[playerid][pArma][4] = 0;
  906.     pInfo[playerid][pAmmo][0] = 0;
  907.     pInfo[playerid][pAmmo][1] = 0;
  908.     pInfo[playerid][pAmmo][2] = 0;
  909.     pInfo[playerid][pAmmo][3] = 0;
  910.     pInfo[playerid][pAmmo][4] = 0;
  911.     SetPVarInt(playerid, "Morreu", 1);
  912.     return 1;
  913. }
  914.  
  915. ///////////////////////////////////////////////////////
  916. //                                                   //
  917. //                                                   //
  918. //                     STOCKS                        //
  919. //                                                   //
  920. //                                                   //
  921. ///////////////////////////////////////////////////////
  922. forward attCoins(playerid);
  923. public attCoins(playerid)
  924. {
  925.     new var[13], var2[13], var3[13];
  926.     format(var, 13, "%d GC", pInfo[playerid][Coins][0]);
  927.     format(var2, 13, "%d SC", pInfo[playerid][Coins][1]);
  928.     format(var3, 13, "%d BC", pInfo[playerid][Coins][2]);
  929.     TextDrawSetString(tCoins[playerid][9], var);
  930.     TextDrawSetString(tCoins[playerid][10], var2);
  931.     TextDrawSetString(tCoins[playerid][11], var3);
  932. }
  933.  
  934. CriarDrawsNormais(playerid)
  935. {
  936.     DrawCadastro[playerid][0] = TextDrawCreate(247.500000, 1.500000, "usebox");
  937.     TextDrawLetterSize(DrawCadastro[playerid][0], 0.000000, 49.412498);
  938.     TextDrawTextSize(DrawCadastro[playerid][0], -2.000000, 0.000000);
  939.     TextDrawAlignment(DrawCadastro[playerid][0], 1);
  940.     TextDrawColor(DrawCadastro[playerid][0], 0);
  941.     TextDrawUseBox(DrawCadastro[playerid][0], true);
  942.     TextDrawBoxColor(DrawCadastro[playerid][0], 102);
  943.     TextDrawSetShadow(DrawCadastro[playerid][0], 0);
  944.     TextDrawSetOutline(DrawCadastro[playerid][0], 0);
  945.     TextDrawFont(DrawCadastro[playerid][0], 0);
  946.  
  947.     DrawCadastro[playerid][1] = TextDrawCreate(41.500000, 34.562500, "Seja muito bem vindo");
  948.     TextDrawLetterSize(DrawCadastro[playerid][1], 0.301999, 1.564999);
  949.     TextDrawAlignment(DrawCadastro[playerid][1], 1);
  950.     TextDrawColor(DrawCadastro[playerid][1], -1);
  951.     TextDrawSetShadow(DrawCadastro[playerid][1], 0);
  952.     TextDrawSetOutline(DrawCadastro[playerid][1], 1);
  953.     TextDrawBackgroundColor(DrawCadastro[playerid][1], 51);
  954.     TextDrawFont(DrawCadastro[playerid][1], 2);
  955.     TextDrawSetProportional(DrawCadastro[playerid][1], 1);
  956.  
  957.     DrawCadastro[playerid][2] = TextDrawCreate(120.100000, 15.727313, NOME_SERVER);
  958.     TextDrawLetterSize(DrawCadastro[playerid][2], 0.449999, 1.600000);
  959.     TextDrawAlignment(DrawCadastro[playerid][2], 2);
  960.     TextDrawColor(DrawCadastro[playerid][2], 0x056339FF);
  961.     TextDrawSetShadow(DrawCadastro[playerid][2], 0);
  962.     TextDrawSetOutline(DrawCadastro[playerid][2], 1);
  963.     TextDrawBackgroundColor(DrawCadastro[playerid][2], 51);
  964.     TextDrawFont(DrawCadastro[playerid][2], 3);
  965.     TextDrawSetProportional(DrawCadastro[playerid][2], 1);
  966.  
  967.     DrawCadastro[playerid][3] = TextDrawCreate(28.000000, 94.937500, "Registre-se abaixo:");
  968.     TextDrawLetterSize(DrawCadastro[playerid][3], 0.309500, 1.687500);
  969.     TextDrawAlignment(DrawCadastro[playerid][3], 1);
  970.     TextDrawColor(DrawCadastro[playerid][3], -1);
  971.     TextDrawSetShadow(DrawCadastro[playerid][3], 0);
  972.     TextDrawSetOutline(DrawCadastro[playerid][3], 1);
  973.     TextDrawBackgroundColor(DrawCadastro[playerid][3], 51);
  974.     TextDrawFont(DrawCadastro[playerid][3], 2);
  975.     TextDrawSetProportional(DrawCadastro[playerid][3], 1);
  976.  
  977.     DrawCadastro[playerid][4] = TextDrawCreate(213.000000, 122.062500, "usebox");
  978.     TextDrawLetterSize(DrawCadastro[playerid][4], 0.000000, 1.627776);
  979.     TextDrawTextSize(DrawCadastro[playerid][4], 27.000000, 0.000000);
  980.     TextDrawAlignment(DrawCadastro[playerid][4], 1);
  981.     TextDrawColor(DrawCadastro[playerid][4], 0);
  982.     TextDrawUseBox(DrawCadastro[playerid][4], true);
  983.     TextDrawBoxColor(DrawCadastro[playerid][4], 255);
  984.     TextDrawSetShadow(DrawCadastro[playerid][4], 0);
  985.     TextDrawSetOutline(DrawCadastro[playerid][4], 0);
  986.     TextDrawBackgroundColor(DrawCadastro[playerid][4], 170);
  987.     TextDrawFont(DrawCadastro[playerid][4], 0);
  988.  
  989.     DrawCadastro[playerid][5] = TextDrawCreate(213.500000, 149.750000, "usebox");
  990.     TextDrawLetterSize(DrawCadastro[playerid][5], 0.000000, 1.627776);
  991.     TextDrawTextSize(DrawCadastro[playerid][5], 26.500000, 0.000000);
  992.     TextDrawAlignment(DrawCadastro[playerid][5], 1);
  993.     TextDrawColor(DrawCadastro[playerid][5], 0);
  994.     TextDrawUseBox(DrawCadastro[playerid][5], true);
  995.     TextDrawBoxColor(DrawCadastro[playerid][5], 255);
  996.     TextDrawSetShadow(DrawCadastro[playerid][5], 0);
  997.     TextDrawSetOutline(DrawCadastro[playerid][5], 0);
  998.     TextDrawBackgroundColor(DrawCadastro[playerid][5], 170);
  999.     TextDrawFont(DrawCadastro[playerid][5], 0);
  1000.  
  1001.     DrawCadastro[playerid][6] = TextDrawCreate(214.500000, 177.875000, "usebox");
  1002.     TextDrawLetterSize(DrawCadastro[playerid][6], 0.000000, 1.627776);
  1003.     TextDrawTextSize(DrawCadastro[playerid][6], 26.500000, 0.000000);
  1004.     TextDrawAlignment(DrawCadastro[playerid][6], 1);
  1005.     TextDrawColor(DrawCadastro[playerid][6], 0);
  1006.     TextDrawUseBox(DrawCadastro[playerid][6], true);
  1007.     TextDrawBoxColor(DrawCadastro[playerid][6], 255);
  1008.     TextDrawSetShadow(DrawCadastro[playerid][6], 0);
  1009.     TextDrawSetOutline(DrawCadastro[playerid][6], 0);
  1010.     TextDrawBackgroundColor(DrawCadastro[playerid][6], 170);
  1011.     TextDrawFont(DrawCadastro[playerid][6], 0);
  1012.  
  1013.     DrawCadastro[playerid][7] = TextDrawCreate(215.500000, 278.750000, "usebox");
  1014.     TextDrawLetterSize(DrawCadastro[playerid][7], 0.000000, 1.627776);
  1015.     TextDrawTextSize(DrawCadastro[playerid][7], 26.000000, 0.000000);
  1016.     TextDrawAlignment(DrawCadastro[playerid][7], 1);
  1017.     TextDrawColor(DrawCadastro[playerid][7], 0);
  1018.     TextDrawUseBox(DrawCadastro[playerid][7], true);
  1019.     TextDrawBoxColor(DrawCadastro[playerid][7], 255);
  1020.     TextDrawSetShadow(DrawCadastro[playerid][7], 0);
  1021.     TextDrawSetOutline(DrawCadastro[playerid][7], 0);
  1022.     TextDrawBackgroundColor(DrawCadastro[playerid][7], 170);
  1023.     TextDrawFont(DrawCadastro[playerid][7], 1);
  1024.  
  1025.     DrawCadastro[playerid][8] = TextDrawCreate(215.500000, 253.937500, "usebox");
  1026.     TextDrawLetterSize(DrawCadastro[playerid][8], 0.000000, 1.627776);
  1027.     TextDrawTextSize(DrawCadastro[playerid][8], 25.500000, 0.000000);
  1028.     TextDrawAlignment(DrawCadastro[playerid][8], 1);
  1029.     TextDrawColor(DrawCadastro[playerid][8], 0);
  1030.     TextDrawUseBox(DrawCadastro[playerid][8], true);
  1031.     TextDrawBoxColor(DrawCadastro[playerid][8], 255);
  1032.     TextDrawSetShadow(DrawCadastro[playerid][8], 0);
  1033.     TextDrawSetOutline(DrawCadastro[playerid][8], 0);
  1034.     TextDrawBackgroundColor(DrawCadastro[playerid][8], 170);
  1035.     TextDrawFont(DrawCadastro[playerid][8], 1);
  1036.    
  1037.     DrawCadastro[playerid][9] = TextDrawCreate(216.500000, 204.937500, "usebox");
  1038.     TextDrawLetterSize(DrawCadastro[playerid][9], 0.000000, 1.627776);
  1039.     TextDrawTextSize(DrawCadastro[playerid][9], 25.500000, 0.000000);
  1040.     TextDrawAlignment(DrawCadastro[playerid][9], 1);
  1041.     TextDrawColor(DrawCadastro[playerid][9], 0);
  1042.     TextDrawUseBox(DrawCadastro[playerid][9], true);
  1043.     TextDrawBoxColor(DrawCadastro[playerid][9], 255);
  1044.     TextDrawSetShadow(DrawCadastro[playerid][9], 0);
  1045.     TextDrawSetOutline(DrawCadastro[playerid][9], 0);
  1046.     TextDrawBackgroundColor(DrawCadastro[playerid][9], 170);
  1047.     TextDrawFont(DrawCadastro[playerid][9], 0);
  1048.  
  1049.     // DRAWS LOGIN //
  1050.     DrawLogin[playerid][0] = TextDrawCreate(397.500000, 1.500000, "usebox");
  1051.     TextDrawLetterSize(DrawLogin[playerid][0], 0.000000, 49.412498);
  1052.     TextDrawTextSize(DrawLogin[playerid][0], 637.500000, 0.000000);
  1053.     TextDrawAlignment(DrawLogin[playerid][0], 1);
  1054.     TextDrawColor(DrawLogin[playerid][0], 0);
  1055.     TextDrawUseBox(DrawLogin[playerid][0], true);
  1056.     TextDrawBoxColor(DrawLogin[playerid][0], 102);
  1057.     TextDrawSetShadow(DrawLogin[playerid][0], 0);
  1058.     TextDrawSetOutline(DrawLogin[playerid][0], 0);
  1059.     TextDrawFont(DrawLogin[playerid][0], 0);
  1060.  
  1061.     DrawLogin[playerid][1] = TextDrawCreate(530.000000, 12.250000, NOME_SERVER);
  1062.     TextDrawLetterSize(DrawLogin[playerid][1], 0.449999, 1.600000);
  1063.     TextDrawAlignment(DrawLogin[playerid][1], 2);
  1064.     TextDrawColor(DrawLogin[playerid][1], 0x056339FF);
  1065.     TextDrawSetShadow(DrawLogin[playerid][1], 0);
  1066.     TextDrawSetOutline(DrawLogin[playerid][1], 1);
  1067.     TextDrawBackgroundColor(DrawLogin[playerid][1], 51);
  1068.     TextDrawFont(DrawLogin[playerid][1], 3);
  1069.     TextDrawSetProportional(DrawLogin[playerid][1], 1);
  1070.  
  1071.     DrawLogin[playerid][2] = TextDrawCreate(432.500000, 53.375000, "Bem vindo novamente");
  1072.     TextDrawLetterSize(DrawLogin[playerid][2], 0.371998, 1.613124);
  1073.     TextDrawAlignment(DrawLogin[playerid][2], 1);
  1074.     TextDrawColor(DrawLogin[playerid][2], -1);
  1075.     TextDrawSetShadow(DrawLogin[playerid][2], 0);
  1076.     TextDrawSetOutline(DrawLogin[playerid][2], 1);
  1077.     TextDrawBackgroundColor(DrawLogin[playerid][2], 51);
  1078.     TextDrawFont(DrawLogin[playerid][2], 2);
  1079.     TextDrawSetProportional(DrawLogin[playerid][2], 1);
  1080.  
  1081.     DrawLogin[playerid][3] = TextDrawCreate(617.000000, 120.500000, "usebox");
  1082.     TextDrawLetterSize(DrawLogin[playerid][3], 0.000000, 4.155553);
  1083.     TextDrawTextSize(DrawLogin[playerid][3], 437.500000, 0.000000);
  1084.     TextDrawAlignment(DrawLogin[playerid][3], 1);
  1085.     TextDrawColor(DrawLogin[playerid][3], 0);
  1086.     TextDrawUseBox(DrawLogin[playerid][3], true);
  1087.     TextDrawBoxColor(DrawLogin[playerid][3], 102);
  1088.     TextDrawSetShadow(DrawLogin[playerid][3], 0);
  1089.     TextDrawSetOutline(DrawLogin[playerid][3], 0);
  1090.     TextDrawFont(DrawLogin[playerid][3], 0);
  1091.  
  1092.     DrawLogin[playerid][4] = TextDrawCreate(618.000000, 173.125000, "usebox");
  1093.     TextDrawLetterSize(DrawLogin[playerid][4], 0.000000, 4.155553);
  1094.     TextDrawTextSize(DrawLogin[playerid][4], 437.500000, 0.000000);
  1095.     TextDrawAlignment(DrawLogin[playerid][4], 1);
  1096.     TextDrawColor(DrawLogin[playerid][4], 0);
  1097.     TextDrawUseBox(DrawLogin[playerid][4], true);
  1098.     TextDrawBoxColor(DrawLogin[playerid][4], 102);
  1099.     TextDrawSetShadow(DrawLogin[playerid][4], 0);
  1100.     TextDrawSetOutline(DrawLogin[playerid][4], 0);
  1101.     TextDrawFont(DrawLogin[playerid][4], 0);
  1102.  
  1103.     DrawLogin[playerid][5] = TextDrawCreate(619.000000, 226.187500, "usebox");
  1104.     TextDrawLetterSize(DrawLogin[playerid][5], 0.000000, 4.155553);
  1105.     TextDrawTextSize(DrawLogin[playerid][5], 437.500000, 0.000000);
  1106.     TextDrawAlignment(DrawLogin[playerid][5], 1);
  1107.     TextDrawColor(DrawLogin[playerid][5], 0);
  1108.     TextDrawUseBox(DrawLogin[playerid][5], true);
  1109.     TextDrawBoxColor(DrawLogin[playerid][5], 102);
  1110.     TextDrawSetShadow(DrawLogin[playerid][5], 0);
  1111.     TextDrawSetOutline(DrawLogin[playerid][5], 0);
  1112.     TextDrawFont(DrawLogin[playerid][5], 0);
  1113.  
  1114.     DrawLogin[playerid][6] = TextDrawCreate(618.500000, 299.437500, "usebox");
  1115.     TextDrawLetterSize(DrawLogin[playerid][6], 0.000000, 1.968055);
  1116.     TextDrawTextSize(DrawLogin[playerid][6], 544.500000, 0.000000);
  1117.     TextDrawAlignment(DrawLogin[playerid][6], 1);
  1118.     TextDrawColor(DrawLogin[playerid][6], 0);
  1119.     TextDrawUseBox(DrawLogin[playerid][6], true);
  1120.     TextDrawBoxColor(DrawLogin[playerid][6], 102);
  1121.     TextDrawSetShadow(DrawLogin[playerid][6], 0);
  1122.     TextDrawSetOutline(DrawLogin[playerid][6], 0);
  1123.     TextDrawFont(DrawLogin[playerid][6], 0);
  1124.     return 1;
  1125. }
  1126. HideTD(playerid)
  1127. {
  1128.     TextDrawDestroy(DrawCadastroInput[playerid][0]);
  1129.     TextDrawDestroy(DrawCadastroInput[playerid][1]);
  1130.     TextDrawDestroy(DrawCadastroInput[playerid][2]);
  1131.     TextDrawDestroy(DrawCadastroInput[playerid][3]);
  1132.     TextDrawDestroy(DrawCadastroInput[playerid][4]);
  1133.     TextDrawDestroy(DrawCadastroInput[playerid][5]);
  1134.     TextDrawDestroy(DrawCadastroInput[playerid][6]);
  1135.     TextDrawDestroy(DrawLoginInput[playerid][0]);
  1136.     TextDrawDestroy(DrawLoginInput[playerid][1]);
  1137.     TextDrawDestroy(DrawLoginInput[playerid][2]);
  1138.     TextDrawDestroy(DrawLoginInput[playerid][3]);
  1139.     TextDrawDestroy(DrawLoginInput[playerid][4]);
  1140.     TextDrawDestroy(DrawCadastro[playerid][0]);
  1141.     TextDrawDestroy(DrawCadastro[playerid][1]);
  1142.     TextDrawDestroy(DrawCadastro[playerid][2]);
  1143.     TextDrawDestroy(DrawCadastro[playerid][3]);
  1144.     TextDrawDestroy(DrawCadastro[playerid][4]);
  1145.     TextDrawDestroy(DrawCadastro[playerid][5]);
  1146.     TextDrawDestroy(DrawCadastro[playerid][6]);
  1147.     TextDrawDestroy(DrawCadastro[playerid][7]);
  1148.     TextDrawDestroy(DrawCadastro[playerid][8]);
  1149.     TextDrawDestroy(DrawCadastro[playerid][9]);
  1150.     TextDrawDestroy(DrawLogin[playerid][0]);
  1151.     TextDrawDestroy(DrawLogin[playerid][1]);
  1152.     TextDrawDestroy(DrawLogin[playerid][2]);
  1153.     TextDrawDestroy(DrawLogin[playerid][3]);
  1154.     TextDrawDestroy(DrawLogin[playerid][4]);
  1155.     TextDrawDestroy(DrawLogin[playerid][5]);
  1156.     TextDrawDestroy(DrawLogin[playerid][6]);
  1157.     return 1;
  1158. }
  1159. CriarDrawsClicaveis(playerid)
  1160. {
  1161.     // DRAWS CLICK CADASTRO //
  1162.     DrawCadastroInput[playerid][0] = TextDrawCreate(118.000000, 55.562500, "NICKNAME");
  1163.     TextDrawLetterSize(DrawCadastroInput[playerid][0], 0.242499, 1.613124);
  1164.     TextDrawAlignment(DrawCadastroInput[playerid][0], 2);
  1165.     TextDrawColor(DrawCadastroInput[playerid][0], -2139094785);
  1166.     TextDrawSetShadow(DrawCadastroInput[playerid][0], 0);
  1167.     TextDrawSetOutline(DrawCadastroInput[playerid][0], 1);
  1168.     TextDrawBackgroundColor(DrawCadastroInput[playerid][0], 51);
  1169.     TextDrawFont(DrawCadastroInput[playerid][0], 2);
  1170.     TextDrawSetProportional(DrawCadastroInput[playerid][0], 1);
  1171.  
  1172.     DrawCadastroInput[playerid][1] = TextDrawCreate(121.000000, 125.125000, "Senha");
  1173.     TextDrawLetterSize(DrawCadastroInput[playerid][1], 0.254495, 1.306872);
  1174.     TextDrawTextSize(DrawCadastroInput[playerid][1], 25.000000, 200.000000);
  1175.     TextDrawAlignment(DrawCadastroInput[playerid][1], 2);
  1176.     TextDrawColor(DrawCadastroInput[playerid][1], -1);
  1177.     TextDrawSetShadow(DrawCadastroInput[playerid][1], 0);
  1178.     TextDrawSetOutline(DrawCadastroInput[playerid][1], 1);
  1179.     TextDrawBackgroundColor(DrawCadastroInput[playerid][1], 51);
  1180.     TextDrawFont(DrawCadastroInput[playerid][1], 2);
  1181.     TextDrawSetProportional(DrawCadastroInput[playerid][1], 1);
  1182.  
  1183.     DrawCadastroInput[playerid][2] = TextDrawCreate(118.000000, 151.937500, "Sexo");
  1184.     TextDrawLetterSize(DrawCadastroInput[playerid][2], 0.254495, 1.306872);
  1185.     TextDrawTextSize(DrawCadastroInput[playerid][2], 25.000000, 200.000000);
  1186.     TextDrawAlignment(DrawCadastroInput[playerid][2], 2);
  1187.     TextDrawColor(DrawCadastroInput[playerid][2], -1);
  1188.     TextDrawSetShadow(DrawCadastroInput[playerid][2], 0);
  1189.     TextDrawSetOutline(DrawCadastroInput[playerid][2], 1);
  1190.     TextDrawBackgroundColor(DrawCadastroInput[playerid][2], 51);
  1191.     TextDrawFont(DrawCadastroInput[playerid][2], 2);
  1192.     TextDrawSetProportional(DrawCadastroInput[playerid][2], 1);
  1193.  
  1194.     DrawCadastroInput[playerid][3] = TextDrawCreate(120.000000, 179.937500, "Idade");
  1195.     TextDrawLetterSize(DrawCadastroInput[playerid][3], 0.242995, 1.193124);
  1196.     TextDrawTextSize(DrawCadastroInput[playerid][3], 25.000000, 200.000000);
  1197.     TextDrawAlignment(DrawCadastroInput[playerid][3], 2);
  1198.     TextDrawColor(DrawCadastroInput[playerid][3], -1);
  1199.     TextDrawSetShadow(DrawCadastroInput[playerid][3], 0);
  1200.     TextDrawSetOutline(DrawCadastroInput[playerid][3], 1);
  1201.     TextDrawBackgroundColor(DrawCadastroInput[playerid][3], 51);
  1202.     TextDrawFont(DrawCadastroInput[playerid][3], 2);
  1203.     TextDrawSetProportional(DrawCadastroInput[playerid][3], 1);
  1204.  
  1205.     DrawCadastroInput[playerid][4] = TextDrawCreate(82.000000, 252.875000, "Registrar");
  1206.     TextDrawLetterSize(DrawCadastroInput[playerid][4], 0.337498, 1.503749);
  1207.     TextDrawTextSize(DrawCadastroInput[playerid][4], 220.000000, 20.000000);
  1208.     TextDrawAlignment(DrawCadastroInput[playerid][4], 1);
  1209.     TextDrawColor(DrawCadastroInput[playerid][4], -1);
  1210.     TextDrawSetShadow(DrawCadastroInput[playerid][4], 0);
  1211.     TextDrawSetOutline(DrawCadastroInput[playerid][4], 0);
  1212.     TextDrawBackgroundColor(DrawCadastroInput[playerid][4], 51);
  1213.     TextDrawFont(DrawCadastroInput[playerid][4], 2);
  1214.     TextDrawSetProportional(DrawCadastroInput[playerid][4], 1);
  1215.  
  1216.     DrawCadastroInput[playerid][5] = TextDrawCreate(101.000000, 278.812500, "Sair");
  1217.     TextDrawLetterSize(DrawCadastroInput[playerid][5], 0.339998, 1.193125);
  1218.     TextDrawTextSize(DrawCadastroInput[playerid][5], 240.000000, 20.000000);
  1219.     TextDrawAlignment(DrawCadastroInput[playerid][5], 1);
  1220.     TextDrawColor(DrawCadastroInput[playerid][5], -1);
  1221.     TextDrawSetShadow(DrawCadastroInput[playerid][5], 0);
  1222.     TextDrawSetOutline(DrawCadastroInput[playerid][5], 0);
  1223.     TextDrawBackgroundColor(DrawCadastroInput[playerid][5], 51);
  1224.     TextDrawFont(DrawCadastroInput[playerid][5], 2);
  1225.     TextDrawSetProportional(DrawCadastroInput[playerid][5], 1);
  1226.    
  1227.     DrawCadastroInput[playerid][6] = TextDrawCreate(119.500000, 206.312500, "Skin");
  1228.     TextDrawLetterSize(DrawCadastroInput[playerid][6], 0.242993, 1.193124);
  1229.     TextDrawTextSize(DrawCadastroInput[playerid][6], 25.000000, 220.000000);
  1230.     TextDrawAlignment(DrawCadastroInput[playerid][6], 2);
  1231.     TextDrawColor(DrawCadastroInput[playerid][6], -1);
  1232.     TextDrawSetShadow(DrawCadastroInput[playerid][6], 0);
  1233.     TextDrawSetOutline(DrawCadastroInput[playerid][6], 1);
  1234.     TextDrawBackgroundColor(DrawCadastroInput[playerid][6], 51);
  1235.     TextDrawFont(DrawCadastroInput[playerid][6], 2);
  1236.     TextDrawSetProportional(DrawCadastroInput[playerid][6], 1);
  1237.     TextDrawSetSelectable(DrawCadastroInput[playerid][6], true);
  1238.  
  1239.     // DRAWS CLICK LOGIN //
  1240.     DrawLoginInput[playerid][0] = TextDrawCreate(534.000000, 71.875000, "NOME");
  1241.     TextDrawLetterSize(DrawLoginInput[playerid][0], 0.371998, 1.613124);
  1242.     TextDrawAlignment(DrawLoginInput[playerid][0], 2);
  1243.     TextDrawColor(DrawLoginInput[playerid][0], -2139094785);
  1244.     TextDrawSetShadow(DrawLoginInput[playerid][0], 0);
  1245.     TextDrawSetOutline(DrawLoginInput[playerid][0], 1);
  1246.     TextDrawBackgroundColor(DrawLoginInput[playerid][0], 51);
  1247.     TextDrawFont(DrawLoginInput[playerid][0], 2);
  1248.     TextDrawSetProportional(DrawLoginInput[playerid][0], 1);
  1249.  
  1250.     DrawLoginInput[playerid][1] = TextDrawCreate(530.000000, 133.125000, "Login");
  1251.     TextDrawLetterSize(DrawLoginInput[playerid][1], 0.400998, 1.495000);
  1252.     TextDrawAlignment(DrawLoginInput[playerid][1], 2);
  1253.     TextDrawColor(DrawLoginInput[playerid][1], -1);
  1254.     TextDrawSetShadow(DrawLoginInput[playerid][1], 0);
  1255.     TextDrawSetOutline(DrawLoginInput[playerid][1], 1);
  1256.     TextDrawBackgroundColor(DrawLoginInput[playerid][1], 51);
  1257.     TextDrawFont(DrawLoginInput[playerid][1], 2);
  1258.     TextDrawSetProportional(DrawLoginInput[playerid][1], 1);
  1259.     TextDrawTextSize(DrawLoginInput[playerid][1], 30.000000, 200.000000);
  1260.  
  1261.     DrawLoginInput[playerid][2] = TextDrawCreate(535.500000, 184.875000, "TeamSpeak");
  1262.     TextDrawLetterSize(DrawLoginInput[playerid][2], 0.254495, 1.106872);
  1263.     TextDrawAlignment(DrawLoginInput[playerid][2], 2);
  1264.     TextDrawColor(DrawLoginInput[playerid][2], -1);
  1265.     TextDrawSetShadow(DrawLoginInput[playerid][2], 0);
  1266.     TextDrawSetOutline(DrawLoginInput[playerid][2], 1);
  1267.     TextDrawBackgroundColor(DrawLoginInput[playerid][2], 51);
  1268.     TextDrawFont(DrawLoginInput[playerid][2], 2);
  1269.     TextDrawSetProportional(DrawLoginInput[playerid][2], 1);
  1270.     TextDrawTextSize(DrawLoginInput[playerid][2], 30.00000, 205.000000);
  1271.  
  1272.     DrawLoginInput[playerid][3] = TextDrawCreate(533.500000, 238.812500, "Forum");
  1273.     TextDrawLetterSize(DrawLoginInput[playerid][3], 0.254495, 1.206872);
  1274.     TextDrawAlignment(DrawLoginInput[playerid][3], 2);
  1275.     TextDrawColor(DrawLoginInput[playerid][3], -1);
  1276.     TextDrawSetShadow(DrawLoginInput[playerid][3], 0);
  1277.     TextDrawSetOutline(DrawLoginInput[playerid][3], 1);
  1278.     TextDrawBackgroundColor(DrawLoginInput[playerid][3], 51);
  1279.     TextDrawFont(DrawLoginInput[playerid][3], 2);
  1280.     TextDrawSetProportional(DrawLoginInput[playerid][3], 1);
  1281.     TextDrawTextSize(DrawLoginInput[playerid][3], 30.000000, 200.000000);
  1282.  
  1283.     DrawLoginInput[playerid][4] = TextDrawCreate(596.500000, 301.875000, "Sair");
  1284.     TextDrawLetterSize(DrawLoginInput[playerid][4], 0.386000, 1.284999);
  1285.     TextDrawAlignment(DrawLoginInput[playerid][4], 2);
  1286.     TextDrawColor(DrawLoginInput[playerid][4], -1);
  1287.     TextDrawSetShadow(DrawLoginInput[playerid][4], 0);
  1288.     TextDrawSetOutline(DrawLoginInput[playerid][4], 1);
  1289.     TextDrawBackgroundColor(DrawLoginInput[playerid][4], 51);
  1290.     TextDrawFont(DrawLoginInput[playerid][4], 2);
  1291.     TextDrawSetProportional(DrawLoginInput[playerid][4], 1);
  1292.     TextDrawTextSize(DrawLoginInput[playerid][4], 30.000000, 200.000000);
  1293.    
  1294.     ShowDraws(playerid);
  1295.     return 1;
  1296. }
  1297.  
  1298. ShowDraws(playerid)
  1299. {
  1300.     TextDrawSetSelectable(DrawCadastroInput[playerid][1], true);
  1301.     TextDrawSetSelectable(DrawCadastroInput[playerid][2], true);
  1302.     TextDrawSetSelectable(DrawCadastroInput[playerid][3], true);
  1303.     TextDrawSetSelectable(DrawCadastroInput[playerid][4], true);
  1304.     TextDrawSetSelectable(DrawCadastroInput[playerid][5], true);
  1305.     TextDrawSetSelectable(DrawCadastroInput[playerid][6], true);
  1306.  
  1307.     TextDrawSetSelectable(DrawLoginInput[playerid][1], true);
  1308.     TextDrawSetSelectable(DrawLoginInput[playerid][2], true);
  1309.     TextDrawSetSelectable(DrawLoginInput[playerid][3], true);
  1310.     TextDrawSetSelectable(DrawLoginInput[playerid][4], true);
  1311.     // SE O PLAYER NAO FOR REGISTRADO //
  1312.     if(!fexist(Arquivo(playerid)))
  1313.     {
  1314.         format(str, 25, "%s", pNome(playerid));
  1315.         TextDrawSetString(DrawCadastroInput[playerid][0], str);
  1316.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][0]);
  1317.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][1]);
  1318.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][2]);
  1319.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][3]);
  1320.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][4]);
  1321.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][5]);
  1322.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][6]);
  1323.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][7]);
  1324.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][8]);
  1325.         TextDrawShowForPlayer(playerid, DrawCadastro[playerid][9]);
  1326.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][0]);
  1327.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][1]);
  1328.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][2]);
  1329.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][3]);
  1330.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][4]);
  1331.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][5]);
  1332.         TextDrawShowForPlayer(playerid, DrawCadastroInput[playerid][6]);
  1333.         registrado[playerid] = 1;
  1334.         Logado[playerid] = false;
  1335.         SelectTextDraw(playerid, COR_TEXTNEW);
  1336.     }
  1337.     else if(fexist(Arquivo(playerid)))
  1338.     {
  1339.     // SE O PLAYER FOR REGISTRADO //
  1340.         format(str, 25, "%s", pNome(playerid));
  1341.         TextDrawSetString(DrawLoginInput[playerid][0], str);
  1342.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][0]);
  1343.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][1]);
  1344.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][2]);
  1345.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][3]);
  1346.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][4]);
  1347.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][5]);
  1348.         TextDrawShowForPlayer(playerid, DrawLogin[playerid][6]);
  1349.         TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][0]);
  1350.         TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][1]);
  1351.         TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][2]);
  1352.         TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][3]);
  1353.         TextDrawShowForPlayer(playerid, DrawLoginInput[playerid][4]);
  1354.         registrado[playerid] = 0;
  1355.         Logado[playerid] = false;
  1356.         SelectTextDraw(playerid, COR_TEXTNEW);
  1357.     }
  1358.     return 1;
  1359. }
  1360.  
  1361. pSalvarConta(playerid)
  1362. {
  1363.     if(fexist(Arquivo(playerid)) && Logado[playerid])
  1364.     {
  1365.         GetPlayerWeaponData(playerid, 2, pInfo[playerid][pArma][0], pInfo[playerid][pAmmo][0]);
  1366.         GetPlayerWeaponData(playerid, 3, pInfo[playerid][pArma][1], pInfo[playerid][pAmmo][1]);
  1367.         GetPlayerWeaponData(playerid, 4, pInfo[playerid][pArma][2], pInfo[playerid][pAmmo][2]);
  1368.         GetPlayerWeaponData(playerid, 5, pInfo[playerid][pArma][3], pInfo[playerid][pAmmo][3]);
  1369.         GetPlayerWeaponData(playerid, 6, pInfo[playerid][pArma][4], pInfo[playerid][pAmmo][4]);
  1370.         new slot1, bala1;
  1371.         GetPlayerWeaponData(playerid, 1, slot1, bala1);
  1372.         if(slot1 > 0) {
  1373.             for(new i = 0; i < 4; i++) {
  1374.                 if(pInfo[playerid][pArma][i] == 0) {
  1375.                     GivePlayerWeapon(playerid, slot1, bala1);
  1376.                     GetPlayerWeaponData(playerid, 1, pInfo[playerid][pArma][i], pInfo[playerid][pAmmo][i]);
  1377.                     break;
  1378.                 }
  1379.             }
  1380.         }
  1381.         if(pInfo[playerid][pArma][0] )
  1382.         DOF2_SetInt(Arquivo(playerid), "Admin", pInfo[playerid][pAdmin]);
  1383.         DOF2_SetInt(Arquivo(playerid), "Level", pInfo[playerid][pLevel]);
  1384.         DOF2_SetInt(Arquivo(playerid), "Grana", pInfo[playerid][pGrana]);
  1385.         DOF2_SetInt(Arquivo(playerid), "Sexo", pInfo[playerid][pSexo]);
  1386.         DOF2_SetInt(Arquivo(playerid), "Idade", pInfo[playerid][pIdade]);
  1387.         DOF2_SetInt(Arquivo(playerid), "Skin", pInfo[playerid][pSkin]);
  1388.         DOF2_SetInt(Arquivo(playerid), "Arma1", pInfo[playerid][pArma][0]);
  1389.         DOF2_SetInt(Arquivo(playerid), "Arma2", pInfo[playerid][pArma][1]);
  1390.         DOF2_SetInt(Arquivo(playerid), "Arma3", pInfo[playerid][pArma][2]);
  1391.         DOF2_SetInt(Arquivo(playerid), "Arma4", pInfo[playerid][pArma][3]);
  1392.         DOF2_SetInt(Arquivo(playerid), "Arma5", pInfo[playerid][pArma][4]);
  1393.         DOF2_SetInt(Arquivo(playerid), "Balas1", pInfo[playerid][pAmmo][0]);
  1394.         DOF2_SetInt(Arquivo(playerid), "Balas2", pInfo[playerid][pAmmo][1]);
  1395.         DOF2_SetInt(Arquivo(playerid), "Balas3", pInfo[playerid][pAmmo][2]);
  1396.         DOF2_SetInt(Arquivo(playerid), "Balas4", pInfo[playerid][pAmmo][3]);
  1397.         DOF2_SetInt(Arquivo(playerid), "Balas5", pInfo[playerid][pAmmo][4]);
  1398.         DOF2_SetInt(Arquivo(playerid), "Balas5", pInfo[playerid][pAmmo][4]);
  1399.         GetPlayerPos(playerid, pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]);
  1400.         GetPlayerFacingAngle(playerid, pInfo[playerid][pFA]);
  1401.         pInfo[playerid][pInt] = GetPlayerInterior(playerid);
  1402.         DOF2_SetFloat(Arquivo(playerid), "X", pInfo[playerid][pX]);
  1403.         DOF2_SetFloat(Arquivo(playerid), "Y", pInfo[playerid][pY]);
  1404.         DOF2_SetFloat(Arquivo(playerid), "Z", pInfo[playerid][pZ]);
  1405.         DOF2_SetFloat(Arquivo(playerid), "FA", pInfo[playerid][pFA]);
  1406.         DOF2_SetInt(Arquivo(playerid), "Int", pInfo[playerid][pInt]);
  1407.         DOF2_SetInt(Arquivo(playerid), "GC", pInfo[playerid][Coins][0]);
  1408.         DOF2_SetInt(Arquivo(playerid), "SC", pInfo[playerid][Coins][1]);
  1409.         DOF2_SetInt(Arquivo(playerid), "BC", pInfo[playerid][Coins][2]);
  1410.         DOF2_SetInt(Arquivo(playerid), "Aviso", pInfo[playerid][pAviso]);
  1411.         DOF2_SaveFile();
  1412.     }
  1413.     return 1;
  1414. }
  1415.  
  1416. pRegistro(playerid)
  1417. {
  1418.     if(!fexist(Arquivo(playerid)))
  1419.     {
  1420.         new rand = random(sizeof(RandomSpawn));
  1421.         DOF2_CreateFile(Arquivo(playerid));
  1422.         DOF2_SetString(Arquivo(playerid), "Senha", senhaDigitada[playerid]);
  1423.         DOF2_SetInt(Arquivo(playerid), "Admin", 0);
  1424.         DOF2_SetInt(Arquivo(playerid), "Level", NIVEL_INICIO);
  1425.         DOF2_SetInt(Arquivo(playerid), "Grana", GRANA_INICIO);
  1426.         DOF2_SetInt(Arquivo(playerid), "Sexo", pInfo[playerid][pSexo]);
  1427.         DOF2_SetInt(Arquivo(playerid), "Idade", pInfo[playerid][pIdade]);
  1428.         DOF2_SetInt(Arquivo(playerid), "Skin", pInfo[playerid][pSkin]);
  1429.         DOF2_SetInt(Arquivo(playerid), "Arma1", 0);
  1430.         DOF2_SetInt(Arquivo(playerid), "Arma2", 0);
  1431.         DOF2_SetInt(Arquivo(playerid), "Arma3", 0);
  1432.         DOF2_SetInt(Arquivo(playerid), "Arma4", 0);
  1433.         DOF2_SetInt(Arquivo(playerid), "Arma5", 0);
  1434.         DOF2_SetInt(Arquivo(playerid), "Balas1", 0);
  1435.         DOF2_SetInt(Arquivo(playerid), "Balas2", 0);
  1436.         DOF2_SetInt(Arquivo(playerid), "Balas3", 0);
  1437.         DOF2_SetInt(Arquivo(playerid), "Balas4", 0);
  1438.         DOF2_SetInt(Arquivo(playerid), "Balas5", 0);
  1439.         DOF2_SetFloat(Arquivo(playerid), "X", RandomSpawn[rand][0]);
  1440.         DOF2_SetFloat(Arquivo(playerid), "Y", RandomSpawn[rand][1]);
  1441.         DOF2_SetFloat(Arquivo(playerid), "Z", RandomSpawn[rand][2]);
  1442.         DOF2_SetFloat(Arquivo(playerid), "FA", RandomSpawn[rand][3]);
  1443.         DOF2_SetInt(Arquivo(playerid), "Int", 0);
  1444.         DOF2_SetInt(Arquivo(playerid), "GC", 0);
  1445.         DOF2_SetInt(Arquivo(playerid), "SC", 0);
  1446.         DOF2_SetInt(Arquivo(playerid), "BC", 0);
  1447.         DOF2_SetInt(Arquivo(playerid), "Aviso", 0);
  1448.         DOF2_SaveFile();
  1449.         HideTD(playerid);
  1450.         CancelSelectTextDraw(playerid);
  1451.         CarregarConta(playerid);
  1452.         TextDrawShowForPlayer(playerid, tCoins[playerid][0]);
  1453.         TextDrawShowForPlayer(playerid, tCoins[playerid][1]);
  1454.         TextDrawShowForPlayer(playerid, tCoins[playerid][2]);
  1455.         TextDrawShowForPlayer(playerid, tCoins[playerid][3]);
  1456.         TextDrawShowForPlayer(playerid, tCoins[playerid][4]);
  1457.         TextDrawShowForPlayer(playerid, tCoins[playerid][5]);
  1458.         TextDrawShowForPlayer(playerid, tCoins[playerid][6]);
  1459.         TextDrawShowForPlayer(playerid, tCoins[playerid][7]);
  1460.         TextDrawShowForPlayer(playerid, tCoins[playerid][8]);
  1461.         TextDrawShowForPlayer(playerid, tCoins[playerid][9]);
  1462.         TextDrawShowForPlayer(playerid, tCoins[playerid][10]);
  1463.         TextDrawShowForPlayer(playerid, tCoins[playerid][11]);
  1464.         SetTimerEx("attCoins", 400, true, "i", playerid);
  1465.         pSpawn(playerid);
  1466.     }
  1467.     return 1;
  1468. }
  1469.  
  1470. CarregarConta(playerid)
  1471. {
  1472.     pInfo[playerid][pLevel] = DOF2_GetInt(Arquivo(playerid), "Level");
  1473.     SetPlayerScore(playerid, pInfo[playerid][pLevel]);
  1474.     pInfo[playerid][pGrana] = DOF2_GetInt(Arquivo(playerid), "Grana");
  1475.     GivePlayerMoney(playerid, pInfo[playerid][pGrana]);
  1476.     pInfo[playerid][pAdmin] = DOF2_GetInt(Arquivo(playerid), "Admin");
  1477.     pInfo[playerid][pSexo] = DOF2_GetInt(Arquivo(playerid), "Sexo");
  1478.     pInfo[playerid][pIdade] = DOF2_GetInt(Arquivo(playerid), "Idade");
  1479.     pInfo[playerid][pSkin] = DOF2_GetInt(Arquivo(playerid), "Skin");
  1480.     pInfo[playerid][pArma][0] = DOF2_GetInt(Arquivo(playerid), "Arma1");
  1481.     pInfo[playerid][pArma][1] = DOF2_GetInt(Arquivo(playerid), "Arma2");
  1482.     pInfo[playerid][pArma][2] = DOF2_GetInt(Arquivo(playerid), "Arma3");
  1483.     pInfo[playerid][pArma][3] = DOF2_GetInt(Arquivo(playerid), "Arma4");
  1484.     pInfo[playerid][pArma][4] = DOF2_GetInt(Arquivo(playerid), "Arma5");
  1485.     pInfo[playerid][pAmmo][0] = DOF2_GetInt(Arquivo(playerid), "Balas1");
  1486.     pInfo[playerid][pAmmo][1] = DOF2_GetInt(Arquivo(playerid), "Balas2");
  1487.     pInfo[playerid][pAmmo][2] = DOF2_GetInt(Arquivo(playerid), "Balas3");
  1488.     pInfo[playerid][pAmmo][3] = DOF2_GetInt(Arquivo(playerid), "Balas4");
  1489.     pInfo[playerid][pAmmo][4] = DOF2_GetInt(Arquivo(playerid), "Balas5");
  1490.     pInfo[playerid][pX] = DOF2_GetFloat(Arquivo(playerid), "X");
  1491.     pInfo[playerid][pY] = DOF2_GetFloat(Arquivo(playerid), "Y");
  1492.     pInfo[playerid][pZ] = DOF2_GetFloat(Arquivo(playerid), "Z");
  1493.     pInfo[playerid][pFA] = DOF2_GetFloat(Arquivo(playerid), "FA");
  1494.     pInfo[playerid][pInt] = DOF2_GetInt(Arquivo(playerid), "Int");
  1495.     pInfo[playerid][Coins][0] = DOF2_GetInt(Arquivo(playerid), "GC");
  1496.     pInfo[playerid][Coins][1] = DOF2_GetInt(Arquivo(playerid), "SC");
  1497.     pInfo[playerid][Coins][2] = DOF2_GetInt(Arquivo(playerid), "BC");
  1498.     pInfo[playerid][pAviso] = DOF2_GetInt(Arquivo(playerid), "Aviso");
  1499.     Logado[playerid] = true;
  1500.     return 1;
  1501. }
  1502.  
  1503. pSpawn(playerid)
  1504. {
  1505.     SetPlayerVirtualWorld(playerid, 0);
  1506.     HideTD(playerid);
  1507.     CancelSelectTextDraw(playerid);
  1508.     TogglePlayerSpectating(playerid, false);
  1509.     TogglePlayerControllable(playerid, 1);
  1510.     if(registrado[playerid] == 1) {
  1511.         new rand = random(sizeof(RandomSpawn));
  1512.         SetSpawnInfo(playerid, NO_TEAM, pInfo[playerid][pSkin], RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]+3, RandomSpawn[rand][3], 0,0,0,0,0,0);
  1513.     }
  1514.     else if(registrado[playerid] == 0) {
  1515.         SetSpawnInfo(playerid, NO_TEAM, pInfo[playerid][pSkin], pInfo[playerid][pX], pInfo[playerid][pY], pInfo[playerid][pZ]+3, pInfo[playerid][pFA], 0,0,0,0,0,0);
  1516.     }
  1517.     SpawnPlayer(playerid); OnPlayerSpawn(playerid);
  1518.     return 1;
  1519. }
  1520.  
  1521. pNome(playerid)
  1522. {
  1523.     new nome[MAX_PLAYER_NAME];
  1524.     GetPlayerName(playerid, nome, sizeof(nome));
  1525.     return nome;
  1526. }
  1527.  
  1528. Arquivo(playerid)
  1529. {
  1530.     format(str, 36, "Contas/%s.ini", pNome(playerid));//Endereço onde será salvo as contas.
  1531.     return str;
  1532. }
  1533.  
  1534. /*Forward (public) das mensagens randomicas*/
  1535. public SendMSG()
  1536. {
  1537.   new random2 = random(sizeof(RandomColors));
  1538.   new randMSG = random(sizeof(RandomMSG));
  1539.   SendClientMessageToAll(RandomColors[random2], RandomMSG[randMSG]);
  1540. }
  1541. /*-----------*/
  1542. /*Comandos em ZCMD e SSCANF*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement