Advertisement
Guest User

Sistema Bancário em TextDraw e Dialogs v2.0

a guest
Feb 15th, 2016
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 33.31 KB | None | 0 0
  1. #include <a_samp>
  2. #include <DOF2>
  3. #include <zcmd>
  4.  
  5. #define DIALOG_DEPOSITAR 7777
  6. #define DIALOG_SACAR 8888
  7. #define DIALOG_SALDO 9999
  8. #define DIALOG_IDTRANSFERIR 1010
  9. #define DIALOG_TRANSFERIR 1111
  10. #define DIALOG_LOGIN 1212
  11. #define DIALOG_REGISTRO 1313
  12.  
  13. enum PlayerInfo{Saldo};
  14. new pInfo[MAX_PLAYERS][PlayerInfo];
  15. new Arquivo[50], Senha[20], String[128], Quantia, ID;
  16. new Text:BANCOBG[15], Text:MAIN[22], PlayerText:PSALDO[5][MAX_PLAYERS];
  17.  
  18. public OnFilterScriptInit()
  19. {
  20.     print("\n-----------------------------------------------_");
  21.     print(" Simples sistema de banco em TextDraws e dialogs v2 ");
  22.     print("                 By : 1sBedxx                     ");
  23.     print("-------------------------------------------------\n");
  24.  
  25.     BANCOBG[0] = TextDrawCreate(401.375000, 186.416656, "usebox");
  26.     TextDrawLetterSize(BANCOBG[0], 0.000000, 16.211114);
  27.     TextDrawTextSize(BANCOBG[0], 234.875000, 0.000000);
  28.     TextDrawAlignment(BANCOBG[0], 1);
  29.     TextDrawColor(BANCOBG[0], 0);
  30.     TextDrawUseBox(BANCOBG[0], true);
  31.     TextDrawBoxColor(BANCOBG[0], 102);
  32.     TextDrawSetShadow(BANCOBG[0], 0);
  33.     TextDrawSetOutline(BANCOBG[0], 0);
  34.     TextDrawFont(BANCOBG[0], 0);
  35.  
  36.     BANCOBG[1] = TextDrawCreate(239.375000, 186.083343, "LD_SPAC:white");
  37.     TextDrawLetterSize(BANCOBG[1], 0.000000, 0.000000);
  38.     TextDrawTextSize(BANCOBG[1], 158.125000, 146.999969);
  39.     TextDrawAlignment(BANCOBG[1], 1);
  40.     TextDrawColor(BANCOBG[1], 286331374);
  41.     TextDrawSetShadow(BANCOBG[1], 0);
  42.     TextDrawSetOutline(BANCOBG[1], 0);
  43.     TextDrawBackgroundColor(BANCOBG[1], 572662510);
  44.     TextDrawFont(BANCOBG[1], 4);
  45.  
  46.     BANCOBG[13] = TextDrawCreate(393.875000, 195.166580, "usebox");
  47.     TextDrawLetterSize(BANCOBG[13], 0.000000, 13.553705);
  48.     TextDrawTextSize(BANCOBG[13], 242.375000, 0.000000);
  49.     TextDrawAlignment(BANCOBG[13], 1);
  50.     TextDrawColor(BANCOBG[13], 0);
  51.     TextDrawUseBox(BANCOBG[13], true);
  52.     TextDrawBoxColor(BANCOBG[13], 102);
  53.     TextDrawSetShadow(BANCOBG[13], 0);
  54.     TextDrawSetOutline(BANCOBG[13], 0);
  55.     TextDrawFont(BANCOBG[13], 0);
  56.  
  57.     BANCOBG[2] = TextDrawCreate(392.000000, 196.333343, "usebox");
  58.     TextDrawLetterSize(BANCOBG[2], 0.000000, 2.470367);
  59.     TextDrawTextSize(BANCOBG[2], 243.625000, 0.000000);
  60.     TextDrawAlignment(BANCOBG[2], 1);
  61.     TextDrawColor(BANCOBG[2], 0);
  62.     TextDrawUseBox(BANCOBG[2], true);
  63.     TextDrawBoxColor(BANCOBG[2], 102);
  64.     TextDrawSetShadow(BANCOBG[2], 0);
  65.     TextDrawSetOutline(BANCOBG[2], 0);
  66.     TextDrawFont(BANCOBG[2], 0);
  67.  
  68.     BANCOBG[3] = TextDrawCreate(392.625000, 196.333343, "usebox");
  69.     TextDrawLetterSize(BANCOBG[3], 0.000000, 3.507406);
  70.     TextDrawTextSize(BANCOBG[3], 243.625000, 0.000000);
  71.     TextDrawAlignment(BANCOBG[3], 1);
  72.     TextDrawColor(BANCOBG[3], 0);
  73.     TextDrawUseBox(BANCOBG[3], true);
  74.     TextDrawBoxColor(BANCOBG[3], 102);
  75.     TextDrawSetShadow(BANCOBG[3], 0);
  76.     TextDrawSetOutline(BANCOBG[3], 0);
  77.     TextDrawFont(BANCOBG[3], 0);
  78.  
  79.     BANCOBG[4] = TextDrawCreate(392.625000, 232.500000, "usebox");
  80.     TextDrawLetterSize(BANCOBG[4], 0.000000, 9.275923);
  81.     TextDrawTextSize(BANCOBG[4], 243.625000, 0.000000);
  82.     TextDrawAlignment(BANCOBG[4], 1);
  83.     TextDrawColor(BANCOBG[4], 0);
  84.     TextDrawUseBox(BANCOBG[4], true);
  85.     TextDrawBoxColor(BANCOBG[4], 102);
  86.     TextDrawSetShadow(BANCOBG[4], 0);
  87.     TextDrawSetOutline(BANCOBG[4], 0);
  88.     TextDrawFont(BANCOBG[4], 0);
  89.  
  90.     BANCOBG[5] = TextDrawCreate(261.875000, 237.999984, "LD_SPAC:white");
  91.     TextDrawLetterSize(BANCOBG[5], 0.000000, 0.000000);
  92.     TextDrawTextSize(BANCOBG[5], 112.500000, 24.499984);
  93.     TextDrawAlignment(BANCOBG[5], 1);
  94.     TextDrawColor(BANCOBG[5], 572662510);
  95.     TextDrawSetShadow(BANCOBG[5], 0);
  96.     TextDrawSetOutline(BANCOBG[5], 0);
  97.     TextDrawFont(BANCOBG[5], 4);
  98.  
  99.     BANCOBG[6] = TextDrawCreate(383.250000, 238.916671, "usebox");
  100.     TextDrawLetterSize(BANCOBG[6], 0.000000, 2.988890);
  101.     TextDrawTextSize(BANCOBG[6], 258.000000, 0.000000);
  102.     TextDrawAlignment(BANCOBG[6], 1);
  103.     TextDrawColor(BANCOBG[6], 0);
  104.     TextDrawUseBox(BANCOBG[6], true);
  105.     TextDrawBoxColor(BANCOBG[6], 102);
  106.     TextDrawSetShadow(BANCOBG[6], 0);
  107.     TextDrawSetOutline(BANCOBG[6], 0);
  108.     TextDrawFont(BANCOBG[6], 0);
  109.  
  110.     BANCOBG[7] = TextDrawCreate(263.125000, 281.750274, "LD_SPAC:white");
  111.     TextDrawLetterSize(BANCOBG[7], 0.000000, 0.000000);
  112.     TextDrawTextSize(BANCOBG[7], 111.875000, 23.916671);
  113.     TextDrawAlignment(BANCOBG[7], 1);
  114.     TextDrawColor(BANCOBG[7], 572662510);
  115.     TextDrawSetShadow(BANCOBG[7], 0);
  116.     TextDrawSetOutline(BANCOBG[7], 0);
  117.     TextDrawFont(BANCOBG[7], 4);
  118.  
  119.     BANCOBG[8] = TextDrawCreate(383.875000, 282.083190, "usebox");
  120.     TextDrawLetterSize(BANCOBG[8], 0.000000, 2.988890);
  121.     TextDrawTextSize(BANCOBG[8], 259.250000, 0.000000);
  122.     TextDrawAlignment(BANCOBG[8], 1);
  123.     TextDrawColor(BANCOBG[8], 0);
  124.     TextDrawUseBox(BANCOBG[8], true);
  125.     TextDrawBoxColor(BANCOBG[8], 102);
  126.     TextDrawSetShadow(BANCOBG[8], 0);
  127.     TextDrawSetOutline(BANCOBG[8], 0);
  128.     TextDrawFont(BANCOBG[8], 0);
  129.  
  130.     BANCOBG[9] = TextDrawCreate(285.000000, 198.333358, "~r~BANCO");
  131.     TextDrawLetterSize(BANCOBG[9], 0.477500, 1.979168);
  132.     TextDrawAlignment(BANCOBG[9], 1);
  133.     TextDrawColor(BANCOBG[9], -1);
  134.     TextDrawSetShadow(BANCOBG[9], 0);
  135.     TextDrawSetOutline(BANCOBG[9], 1);
  136.     TextDrawBackgroundColor(BANCOBG[9], 51);
  137.     TextDrawFont(BANCOBG[9], 2);
  138.     TextDrawSetProportional(BANCOBG[9], 1);
  139.  
  140.     BANCOBG[10] = TextDrawCreate(286.250000, 242.666793, "~r~LOGAR");
  141.     TextDrawLetterSize(BANCOBG[10], 0.446874, 1.559166);
  142.     TextDrawAlignment(BANCOBG[10], 1);
  143.     TextDrawColor(BANCOBG[10], -1);
  144.     TextDrawSetShadow(BANCOBG[10], 0);
  145.     TextDrawSetOutline(BANCOBG[10], 1);
  146.     TextDrawBackgroundColor(BANCOBG[10], 51);
  147.     TextDrawFont(BANCOBG[10], 2);
  148.     TextDrawSetProportional(BANCOBG[10], 1);
  149.     TextDrawSetSelectable(BANCOBG[10], true);
  150.     TextDrawTextSize(BANCOBG[10], 342, 10.000000);
  151.  
  152.     BANCOBG[11] = TextDrawCreate(275.000000, 286.416625, "~r~REGISTRAR");
  153.     TextDrawLetterSize(BANCOBG[11], 0.374998, 1.389997);
  154.     TextDrawAlignment(BANCOBG[11], 1);
  155.     TextDrawColor(BANCOBG[11], -1);
  156.     TextDrawSetShadow(BANCOBG[11], 0);
  157.     TextDrawSetOutline(BANCOBG[11], 1);
  158.     TextDrawBackgroundColor(BANCOBG[11], 51);
  159.     TextDrawFont(BANCOBG[11], 2);
  160.     TextDrawSetProportional(BANCOBG[11], 1);
  161.     TextDrawSetSelectable(BANCOBG[11], true);
  162.     TextDrawTextSize(BANCOBG[11], 385, 10.000000);
  163.  
  164.     BANCOBG[12] = TextDrawCreate(246.250000, 220.500000, "LD_SPAC:white");
  165.     TextDrawLetterSize(BANCOBG[12], 0.000000, 0.000000);
  166.     TextDrawTextSize(BANCOBG[12], 144.375000, 1.750000);
  167.     TextDrawAlignment(BANCOBG[12], 1);
  168.     TextDrawColor(BANCOBG[12], 286331374);
  169.     TextDrawSetShadow(BANCOBG[12], 0);
  170.     TextDrawSetOutline(BANCOBG[12], 0);
  171.     TextDrawBackgroundColor(BANCOBG[12], 125);
  172.     TextDrawFont(BANCOBG[12], 4);
  173.  
  174.     BANCOBG[14] = TextDrawCreate(386.875000, 181.416687, "~r~x");
  175.     TextDrawLetterSize(BANCOBG[14], 0.449999, 1.600000);
  176.     TextDrawAlignment(BANCOBG[14], 1);
  177.     TextDrawColor(BANCOBG[14], -1);
  178.     TextDrawSetShadow(BANCOBG[14], 0);
  179.     TextDrawSetOutline(BANCOBG[14], 1);
  180.     TextDrawBackgroundColor(BANCOBG[14], 51);
  181.     TextDrawFont(BANCOBG[14], 1);
  182.     TextDrawSetProportional(BANCOBG[14], 1);
  183.     TextDrawSetSelectable(BANCOBG[14], true);
  184.     TextDrawTextSize(BANCOBG[14], 486, 10.000000);
  185.  
  186.  
  187.     MAIN[0] = TextDrawCreate(495.125000, 160.750000, "usebox");
  188.     TextDrawLetterSize(MAIN[0], 0.000000, 23.211111);
  189.     TextDrawTextSize(MAIN[0], 141.750000, 0.000000);
  190.     TextDrawAlignment(MAIN[0], 1);
  191.     TextDrawColor(MAIN[0], 0);
  192.     TextDrawUseBox(MAIN[0], true);
  193.     TextDrawBoxColor(MAIN[0], 102);
  194.     TextDrawSetShadow(MAIN[0], 0);
  195.     TextDrawSetOutline(MAIN[0], 0);
  196.     TextDrawFont(MAIN[0], 0);
  197.  
  198.     MAIN[1] = TextDrawCreate(147.500000, 162.750000, "LD_SPAC:white");
  199.     TextDrawLetterSize(MAIN[1], 0.000000, 0.000000);
  200.     TextDrawTextSize(MAIN[1], 341.875000, 204.750000);
  201.     TextDrawAlignment(MAIN[1], 1);
  202.     TextDrawColor(MAIN[1], 572662527);
  203.     TextDrawSetShadow(MAIN[1], 0);
  204.     TextDrawSetOutline(MAIN[1], 0);
  205.     TextDrawFont(MAIN[1], 4);
  206.  
  207.     MAIN[2] = TextDrawCreate(481.375000, 174.750000, "usebox");
  208.     TextDrawLetterSize(MAIN[2], 0.000000, 3.442593);
  209.     TextDrawTextSize(MAIN[2], 154.875000, 0.000000);
  210.     TextDrawAlignment(MAIN[2], 1);
  211.     TextDrawColor(MAIN[2], 0);
  212.     TextDrawUseBox(MAIN[2], true);
  213.     TextDrawBoxColor(MAIN[2], 102);
  214.     TextDrawSetShadow(MAIN[2], 0);
  215.     TextDrawSetOutline(MAIN[2], 0);
  216.     TextDrawFont(MAIN[2], 0);
  217.  
  218.     MAIN[3] = TextDrawCreate(482.000000, 174.750000, "usebox");
  219.     TextDrawLetterSize(MAIN[3], 0.000000, 4.479628);
  220.     TextDrawTextSize(MAIN[3], 154.875000, 0.000000);
  221.     TextDrawAlignment(MAIN[3], 1);
  222.     TextDrawColor(MAIN[3], 0);
  223.     TextDrawUseBox(MAIN[3], true);
  224.     TextDrawBoxColor(MAIN[3], 102);
  225.     TextDrawSetShadow(MAIN[3], 0);
  226.     TextDrawSetOutline(MAIN[3], 0);
  227.     TextDrawFont(MAIN[3], 0);
  228.  
  229.     MAIN[4] = TextDrawCreate(291.250000, 185.500030, "~r~BANCO");
  230.     TextDrawLetterSize(MAIN[4], 0.449999, 1.600000);
  231.     TextDrawAlignment(MAIN[4], 1);
  232.     TextDrawColor(MAIN[4], -1);
  233.     TextDrawSetShadow(MAIN[4], 0);
  234.     TextDrawSetOutline(MAIN[4], 1);
  235.     TextDrawBackgroundColor(MAIN[4], 51);
  236.     TextDrawFont(MAIN[4], 2);
  237.     TextDrawSetProportional(MAIN[4], 1);
  238.  
  239.     MAIN[5] = TextDrawCreate(254.375000, 208.833358, "~r~ESCOLHA UMA ACAO ABAIXO");
  240.     TextDrawLetterSize(MAIN[5], 0.236874, 0.689999);
  241.     TextDrawAlignment(MAIN[5], 1);
  242.     TextDrawColor(MAIN[5], -1);
  243.     TextDrawSetShadow(MAIN[5], 0);
  244.     TextDrawSetOutline(MAIN[5], 1);
  245.     TextDrawBackgroundColor(MAIN[5], 51);
  246.     TextDrawFont(MAIN[5], 2);
  247.     TextDrawSetProportional(MAIN[5], 1);
  248.  
  249.     MAIN[6] = TextDrawCreate(482.000000, 225.499984, "usebox");
  250.     TextDrawLetterSize(MAIN[6], 0.000000, 14.785184);
  251.     TextDrawTextSize(MAIN[6], 154.875000, 0.000000);
  252.     TextDrawAlignment(MAIN[6], 1);
  253.     TextDrawColor(MAIN[6], 0);
  254.     TextDrawUseBox(MAIN[6], true);
  255.     TextDrawBoxColor(MAIN[6], 102);
  256.     TextDrawSetShadow(MAIN[6], 0);
  257.     TextDrawSetOutline(MAIN[6], 0);
  258.     TextDrawFont(MAIN[6], 0);
  259.  
  260.     MAIN[7] = TextDrawCreate(477.000000, 231.333328, "usebox");
  261.     TextDrawLetterSize(MAIN[7], 0.000000, 13.359262);
  262.     TextDrawTextSize(MAIN[7], 160.500000, 0.000000);
  263.     TextDrawAlignment(MAIN[7], 1);
  264.     TextDrawColor(MAIN[7], 0);
  265.     TextDrawUseBox(MAIN[7], true);
  266.     TextDrawBoxColor(MAIN[7], 102);
  267.     TextDrawSetShadow(MAIN[7], 0);
  268.     TextDrawSetOutline(MAIN[7], 0);
  269.     TextDrawFont(MAIN[7], 0);
  270.  
  271.     MAIN[8] = TextDrawCreate(470.750000, 237.750000, "usebox");
  272.     TextDrawLetterSize(MAIN[8], 0.000000, 11.738889);
  273.     TextDrawTextSize(MAIN[8], 167.375000, 0.000000);
  274.     TextDrawAlignment(MAIN[8], 1);
  275.     TextDrawColor(MAIN[8], 0);
  276.     TextDrawUseBox(MAIN[8], true);
  277.     TextDrawBoxColor(MAIN[8], 102);
  278.     TextDrawSetShadow(MAIN[8], 0);
  279.     TextDrawSetOutline(MAIN[8], 0);
  280.     TextDrawFont(MAIN[8], 0);
  281.  
  282.     MAIN[9] = TextDrawCreate(173.125000, 239.750000, "LD_SPAC:white");
  283.     TextDrawLetterSize(MAIN[9], 0.000000, 0.000000);
  284.     TextDrawTextSize(MAIN[9], 291.875000, 102.083312);
  285.     TextDrawAlignment(MAIN[9], 1);
  286.     TextDrawColor(MAIN[9], 572662527);
  287.     TextDrawSetShadow(MAIN[9], 0);
  288.     TextDrawSetOutline(MAIN[9], 0);
  289.     TextDrawFont(MAIN[9], 4);
  290.  
  291.     MAIN[10] = TextDrawCreate(447.000000, 256.999969, "usebox");
  292.     TextDrawLetterSize(MAIN[10], 0.000000, 7.461111);
  293.     TextDrawTextSize(MAIN[10], 189.250000, 0.000000);
  294.     TextDrawAlignment(MAIN[10], 1);
  295.     TextDrawColor(MAIN[10], 0);
  296.     TextDrawUseBox(MAIN[10], true);
  297.     TextDrawBoxColor(MAIN[10], 102);
  298.     TextDrawSetShadow(MAIN[10], 0);
  299.     TextDrawSetOutline(MAIN[10], 0);
  300.     TextDrawFont(MAIN[10], 0);
  301.  
  302.     MAIN[11] = TextDrawCreate(195.625000, 259.000000, "LD_SPAC:white");
  303.     TextDrawLetterSize(MAIN[11], 0.000000, 0.000000);
  304.     TextDrawTextSize(MAIN[11], 245.625000, 63.583312);
  305.     TextDrawAlignment(MAIN[11], 1);
  306.     TextDrawColor(MAIN[11], 572662527);
  307.     TextDrawUseBox(MAIN[11], true);
  308.     TextDrawBoxColor(MAIN[11], 102);
  309.     TextDrawSetShadow(MAIN[11], 0);
  310.     TextDrawSetOutline(MAIN[11], 0);
  311.     TextDrawFont(MAIN[11], 4);
  312.  
  313.     MAIN[12] = TextDrawCreate(443.250000, 289.083343, "usebox");
  314.     TextDrawLetterSize(MAIN[12], 0.000000, 0.266666);
  315.     TextDrawTextSize(MAIN[12], 193.000000, 0.000000);
  316.     TextDrawAlignment(MAIN[12], 1);
  317.     TextDrawColor(MAIN[12], 0);
  318.     TextDrawUseBox(MAIN[12], true);
  319.     TextDrawBoxColor(MAIN[12], 102);
  320.     TextDrawSetShadow(MAIN[12], 0);
  321.     TextDrawSetOutline(MAIN[12], 0);
  322.     TextDrawFont(MAIN[12], 0);
  323.  
  324.     MAIN[13] = TextDrawCreate(327.000000, 261.083312, "usebox");
  325.     TextDrawLetterSize(MAIN[13], 0.000000, 6.553708);
  326.     TextDrawTextSize(MAIN[13], 313.625000, 0.000000);
  327.     TextDrawAlignment(MAIN[13], 1);
  328.     TextDrawColor(MAIN[13], 0);
  329.     TextDrawUseBox(MAIN[13], true);
  330.     TextDrawBoxColor(MAIN[13], 102);
  331.     TextDrawSetShadow(MAIN[13], 0);
  332.     TextDrawSetOutline(MAIN[13], 0);
  333.     TextDrawFont(MAIN[13], 0);
  334.  
  335.     MAIN[14] = TextDrawCreate(203.125000, 266.583251, "~r~DEPOSITAR");
  336.     TextDrawLetterSize(MAIN[14], 0.449999, 1.600000);
  337.     TextDrawAlignment(MAIN[14], 1);
  338.     TextDrawColor(MAIN[14], -1);
  339.     TextDrawSetShadow(MAIN[14], 0);
  340.     TextDrawSetOutline(MAIN[14], 1);
  341.     TextDrawBackgroundColor(MAIN[14], 51);
  342.     TextDrawFont(MAIN[14], 2);
  343.     TextDrawSetProportional(MAIN[14], 1);
  344.     TextDrawSetSelectable(MAIN[14], true);
  345.     TextDrawTextSize(MAIN[14], 306, 10.000000);
  346.  
  347.     MAIN[15] = TextDrawCreate(351.250000, 266.000000, "~r~SACAR");
  348.     TextDrawLetterSize(MAIN[15], 0.449999, 1.600000);
  349.     TextDrawAlignment(MAIN[15], 1);
  350.     TextDrawColor(MAIN[15], -1);
  351.     TextDrawSetShadow(MAIN[15], 0);
  352.     TextDrawSetOutline(MAIN[15], 1);
  353.     TextDrawBackgroundColor(MAIN[15], 51);
  354.     TextDrawFont(MAIN[15], 2);
  355.     TextDrawSetProportional(MAIN[15], 1);
  356.     TextDrawSetSelectable(MAIN[15], true);
  357.     TextDrawTextSize(MAIN[15], 452, 10.000000);
  358.  
  359.     MAIN[16] = TextDrawCreate(223.125000, 302.166656, "~r~SALDO");
  360.     TextDrawLetterSize(MAIN[16], 0.449999, 1.600000);
  361.     TextDrawAlignment(MAIN[16], 1);
  362.     TextDrawColor(MAIN[16], -1);
  363.     TextDrawSetShadow(MAIN[16], 0);
  364.     TextDrawSetOutline(MAIN[16], 1);
  365.     TextDrawBackgroundColor(MAIN[16], 51);
  366.     TextDrawFont(MAIN[16], 2);
  367.     TextDrawSetProportional(MAIN[16], 1);
  368.     TextDrawSetSelectable(MAIN[16], true);
  369.     TextDrawTextSize(MAIN[16], 326, 10.000000);
  370.  
  371.     MAIN[17] = TextDrawCreate(331.875000, 301.583312, "~r~TRANSFERIR");
  372.     TextDrawLetterSize(MAIN[17], 0.404374, 1.518332);
  373.     TextDrawAlignment(MAIN[17], 1);
  374.     TextDrawColor(MAIN[17], -1);
  375.     TextDrawSetShadow(MAIN[17], 0);
  376.     TextDrawSetOutline(MAIN[17], 1);
  377.     TextDrawBackgroundColor(MAIN[17], 51);
  378.     TextDrawFont(MAIN[17], 2);
  379.     TextDrawSetProportional(MAIN[17], 1);
  380.     TextDrawSetSelectable(MAIN[17], true);
  381.     TextDrawTextSize(MAIN[17], 432, 10.000000);
  382.  
  383.     MAIN[18] = TextDrawCreate(474.375000, 164.499954, "~r~x");
  384.     TextDrawLetterSize(MAIN[18], 0.449999, 1.600000);
  385.     TextDrawAlignment(MAIN[18], 1);
  386.     TextDrawColor(MAIN[18], -1);
  387.     TextDrawSetShadow(MAIN[18], 0);
  388.     TextDrawSetOutline(MAIN[18], 1);
  389.     TextDrawBackgroundColor(MAIN[18], 51);
  390.     TextDrawFont(MAIN[18], 1);
  391.     TextDrawSetProportional(MAIN[18], 1);
  392.     TextDrawSetSelectable(MAIN[18], true);
  393.     TextDrawTextSize(MAIN[18], 578, 10.000000);
  394.  
  395.     MAIN[19] = TextDrawCreate(157.500000, 172.666656, "LD_SPAC:white");
  396.     TextDrawLetterSize(MAIN[19], 0.000000, 0.000000);
  397.     TextDrawTextSize(MAIN[19], 315.000000, 0.583343);
  398.     TextDrawAlignment(MAIN[19], 1);
  399.     TextDrawColor(MAIN[19], -16777046);
  400.     TextDrawSetShadow(MAIN[19], 0);
  401.     TextDrawSetOutline(MAIN[19], 0);
  402.     TextDrawFont(MAIN[19], 4);
  403.  
  404.     MAIN[20] = TextDrawCreate(157.500000, 224.000000, "LD_SPAC:white");
  405.     TextDrawLetterSize(MAIN[20], 0.000000, 0.000000);
  406.     TextDrawTextSize(MAIN[20], 322.500000, 0.583328);
  407.     TextDrawAlignment(MAIN[20], 1);
  408.     TextDrawColor(MAIN[20], -16777046);
  409.     TextDrawSetShadow(MAIN[20], 0);
  410.     TextDrawSetOutline(MAIN[20], 0);
  411.     TextDrawFont(MAIN[20], 4);
  412.  
  413.     MAIN[21] = TextDrawCreate(157.500000, 360.500000, "LD_SPAC:white");
  414.     TextDrawLetterSize(MAIN[21], 0.000000, 0.000000);
  415.     TextDrawTextSize(MAIN[21], 322.500000, 0.583312);
  416.     TextDrawAlignment(MAIN[21], 1);
  417.     TextDrawColor(MAIN[21], -16777046);
  418.     TextDrawSetShadow(MAIN[21], 0);
  419.     TextDrawSetOutline(MAIN[21], 0);
  420.     TextDrawFont(MAIN[21], 4);
  421.  
  422.     //Create3DTextLabel("Banco\n/banco ou 'F'", 0x9955DEEE, 2308.6851, -13.2479, 26.7422, 10,0);
  423.     //CreatePickup(1274, 1, 2308.6851, -13.2479, 26.7422, -1);
  424.  
  425.     Create3DTextLabel("Banco\n/banco ou 'F'", 0x9955DEEE, 2316.5586,-7.2823,26.7422, 10,0);
  426.     Create3DTextLabel("Banco\n/banco ou 'F'", 0x9955DEEE, 2316.5962,-9.9491,26.7422, 10,0);
  427.     Create3DTextLabel("Banco\n/banco ou 'F'", 0x9955DEEE, 2316.6160,-12.5703,26.7422, 10,0);
  428.     CreatePickup(1274, 1, 2316.5586,-7.2823,26.7422, -1);
  429.     CreatePickup(1274, 1, 2316.5962,-9.9491,26.7422, -1);
  430.     CreatePickup(1274, 1, 2316.6160,-12.5703,26.7422, -1);
  431.     return 1;
  432. }
  433.  
  434. public OnFilterScriptExit()
  435. {
  436.     DOF2_Exit();
  437.     return 1;
  438. }
  439.  
  440. public OnPlayerConnect(playerid)
  441. {
  442.     PSALDO[0][playerid] = CreatePlayerTextDraw(playerid, 410.750000, 236.583328, "usebox");
  443.     PlayerTextDrawLetterSize(playerid, PSALDO[0][playerid], 0.000000, 4.155553);
  444.     PlayerTextDrawTextSize(playerid, PSALDO[0][playerid], 219.250000, 0.000000);
  445.     PlayerTextDrawAlignment(playerid, PSALDO[0][playerid], 1);
  446.     PlayerTextDrawColor(playerid, PSALDO[0][playerid], 0);
  447.     PlayerTextDrawUseBox(playerid, PSALDO[0][playerid], true);
  448.     PlayerTextDrawBoxColor(playerid, PSALDO[0][playerid], 102);
  449.     PlayerTextDrawSetShadow(playerid, PSALDO[0][playerid], 0);
  450.     PlayerTextDrawSetOutline(playerid, PSALDO[0][playerid], 0);
  451.     PlayerTextDrawFont(playerid, PSALDO[0][playerid], 0);
  452.  
  453.     PSALDO[1][playerid] = CreatePlayerTextDraw(playerid, 223.750000, 236.833328, "LD_SPAC:white");
  454.     PlayerTextDrawLetterSize(playerid, PSALDO[1][playerid], 0.000000, 0.000000);
  455.     PlayerTextDrawTextSize(playerid, PSALDO[1][playerid], 183.125000, 36.749984);
  456.     PlayerTextDrawAlignment(playerid, PSALDO[1][playerid], 1);
  457.     PlayerTextDrawColor(playerid, PSALDO[1][playerid], 286331306);
  458.     PlayerTextDrawSetShadow(playerid, PSALDO[1][playerid], 0);
  459.     PlayerTextDrawSetOutline(playerid, PSALDO[1][playerid], 0);
  460.     PlayerTextDrawFont(playerid, PSALDO[1][playerid], 4);
  461.  
  462.     PSALDO[2][playerid] = CreatePlayerTextDraw(playerid, 231.250000, 242.666702, "~r~Ola¡ Sr.Hanshioisa seu~n~saldo atual e de");
  463.     PlayerTextDrawLetterSize(playerid, PSALDO[2][playerid], 0.215624, 0.864999);
  464.     PlayerTextDrawAlignment(playerid, PSALDO[2][playerid], 1);
  465.     PlayerTextDrawColor(playerid, PSALDO[2][playerid], -1);
  466.     PlayerTextDrawSetShadow(playerid, PSALDO[2][playerid], 0);
  467.     PlayerTextDrawSetOutline(playerid, PSALDO[2][playerid], 1);
  468.     PlayerTextDrawBackgroundColor(playerid, PSALDO[2][playerid], 51);
  469.     PlayerTextDrawFont(playerid, PSALDO[2][playerid], 2);
  470.     PlayerTextDrawSetProportional(playerid, PSALDO[2][playerid], 1);
  471.  
  472.     PSALDO[3][playerid] = CreatePlayerTextDraw(playerid, 230.625000, 259.583343, "~g~$0");
  473.     PlayerTextDrawLetterSize(playerid, PSALDO[3][playerid], 0.315624, 0.929166);
  474.     PlayerTextDrawAlignment(playerid, PSALDO[3][playerid], 1);
  475.     PlayerTextDrawColor(playerid, PSALDO[3][playerid], -1);
  476.     PlayerTextDrawSetShadow(playerid, PSALDO[3][playerid], 0);
  477.     PlayerTextDrawSetOutline(playerid, PSALDO[3][playerid], 1);
  478.     PlayerTextDrawBackgroundColor(playerid, PSALDO[3][playerid], 51);
  479.     PlayerTextDrawFont(playerid, PSALDO[3][playerid], 2);
  480.     PlayerTextDrawSetProportional(playerid, PSALDO[3][playerid], 1);
  481.  
  482.     PSALDO[4][playerid] = CreatePlayerTextDraw(playerid, 392.500000, 237.416671, "~r~x");
  483.     PlayerTextDrawLetterSize(playerid, PSALDO[4][playerid], 0.449999, 1.600000);
  484.     PlayerTextDrawAlignment(playerid, PSALDO[4][playerid], 1);
  485.     PlayerTextDrawColor(playerid, PSALDO[4][playerid], -1);
  486.     PlayerTextDrawSetShadow(playerid, PSALDO[4][playerid], 0);
  487.     PlayerTextDrawSetOutline(playerid, PSALDO[4][playerid], 1);
  488.     PlayerTextDrawBackgroundColor(playerid, PSALDO[4][playerid], 51);
  489.     PlayerTextDrawFont(playerid, PSALDO[4][playerid], 1);
  490.     PlayerTextDrawSetProportional(playerid, PSALDO[4][playerid], 1);
  491.     PlayerTextDrawSetSelectable(playerid, PSALDO[4][playerid], true);
  492.     CarregarDados(playerid);
  493.     return 1;
  494. }
  495.  
  496. forward Mostrarsaldo(playerid);
  497. public Mostrarsaldo(playerid)
  498. {
  499.     Fecharbanco(playerid);
  500.     PlayerTextDrawShow(playerid, PSALDO[0][playerid]);
  501.     PlayerTextDrawShow(playerid, PSALDO[1][playerid]);
  502.  
  503.     format(String, sizeof(String), "Ola Sr. %s seu~n~saldo atual e de", Playername(playerid));
  504.     PlayerTextDrawSetString(playerid, PSALDO[2][playerid], String);
  505.     PlayerTextDrawShow(playerid, PSALDO[2][playerid]);
  506.  
  507.     format(Arquivo, 50, "Banco/Contas/%s.ini", Playername(playerid));
  508.     pInfo[playerid][Saldo] = DOF2_GetInt(Arquivo, "Saldo");
  509.     format(String, sizeof(String), " -> $%d", pInfo[playerid][Saldo]);
  510.     PlayerTextDrawSetString(playerid, PSALDO[3][playerid], String);
  511.     PlayerTextDrawShow(playerid, PSALDO[3][playerid]);
  512.  
  513.     PlayerTextDrawShow(playerid, PSALDO[4][playerid]);
  514.     SelectTextDraw(playerid, 0xFF0000AA);
  515.     return 1;
  516. }
  517.  
  518. forward Fecharsaldo(playerid);
  519. public Fecharsaldo(playerid)
  520. {
  521.     PlayerTextDrawHide(playerid, PSALDO[0][playerid]);
  522.     PlayerTextDrawHide(playerid, PSALDO[1][playerid]);
  523.     PlayerTextDrawHide(playerid, PSALDO[2][playerid]);
  524.     PlayerTextDrawHide(playerid, PSALDO[3][playerid]);
  525.     PlayerTextDrawHide(playerid, PSALDO[4][playerid]);
  526.     Mostrarbanco(playerid);
  527.     return 1;
  528. }
  529.  
  530. public OnPlayerDisconnect(playerid, reason)
  531. {
  532.     return 1;
  533. }
  534.  
  535. CMD:banco(playerid, params[])
  536. {
  537.     if(IsPlayerInRangeOfPoint(playerid, 1.0, 2316.5586,-7.2823,26.7422) || IsPlayerInRangeOfPoint(playerid, 1.0, 2316.5962,-9.9491,26.7422) || IsPlayerInRangeOfPoint(playerid, 1.0, 2316.6160,-12.5703,26.7422))
  538.     {
  539.         TextDrawShowForPlayer(playerid, BANCOBG[0]);
  540.         TextDrawShowForPlayer(playerid, BANCOBG[1]);
  541.         TextDrawShowForPlayer(playerid, BANCOBG[2]);
  542.         TextDrawShowForPlayer(playerid, BANCOBG[3]);
  543.         TextDrawShowForPlayer(playerid, BANCOBG[4]);
  544.         TextDrawShowForPlayer(playerid, BANCOBG[5]);
  545.         TextDrawShowForPlayer(playerid, BANCOBG[6]);
  546.         TextDrawShowForPlayer(playerid, BANCOBG[7]);
  547.         TextDrawShowForPlayer(playerid, BANCOBG[8]);
  548.         TextDrawShowForPlayer(playerid, BANCOBG[9]);
  549.         TextDrawShowForPlayer(playerid, BANCOBG[10]);
  550.         TextDrawShowForPlayer(playerid, BANCOBG[11]);
  551.         TextDrawShowForPlayer(playerid, BANCOBG[12]);
  552.         TextDrawShowForPlayer(playerid, BANCOBG[13]);
  553.         TextDrawShowForPlayer(playerid, BANCOBG[14]);
  554.         SelectTextDraw(playerid, 0xFF0000AA);
  555.         return 1;
  556.     }
  557.     return 1;
  558. }
  559.  
  560. CMD:irb(playerid, params[])
  561. {
  562.     SetPlayerPos(playerid, 2306.9338, -16.0632, 26.7496);
  563.     SetPlayerInterior(playerid, 0);
  564.     return 1;
  565. }
  566.  
  567. public OnPlayerClickTextDraw(playerid, Text: clickedid)
  568. {
  569.     if(clickedid == BANCOBG[10])
  570.     {
  571.         format(Arquivo, sizeof(Arquivo), "Banco/Contas/%s.ini", Playername(playerid));
  572.         if (!DOF2_FileExists(Arquivo)) return SendClientMessage(playerid, 0xFF0000AA, "Erro : Você não possui uma conta, se registre para acessar nossos serviços.");
  573.         if (DOF2_FileExists(Arquivo))
  574.         {
  575.             format(String, sizeof(String), "Olá Sr. %s digite sua senha para logar-se.", Playername(playerid));
  576.             ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "BANCO", String, "Entrar", "Sair");
  577.         }
  578.         return 1;
  579.     }
  580.     else if(clickedid == BANCOBG[11])
  581.     {
  582.         format(Arquivo, sizeof(Arquivo), "Banco/Contas/%s.ini", Playername(playerid));
  583.         if (DOF2_FileExists(Arquivo))
  584.         {
  585.             SendClientMessage(playerid, 0xFF0000AA, "Erro : Você já possui uma conta, logue-se para acessar nossos serviços.");
  586.         }
  587.         else
  588.         {
  589.             format(String, sizeof(String), "Olá Sr. %s, registre-se agora e desfrute de nossos serviços.", Playername(playerid));
  590.             ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "BANCO", String, "Registrar", "Sair");
  591.         }
  592.         return 1;
  593.     }
  594.     else if(clickedid == BANCOBG[14])
  595.     {
  596.         TextDrawHideForPlayer(playerid, BANCOBG[0]);
  597.         TextDrawHideForPlayer(playerid, BANCOBG[1]);
  598.         TextDrawHideForPlayer(playerid, BANCOBG[2]);
  599.         TextDrawHideForPlayer(playerid, BANCOBG[3]);
  600.         TextDrawHideForPlayer(playerid, BANCOBG[4]);
  601.         TextDrawHideForPlayer(playerid, BANCOBG[5]);
  602.         TextDrawHideForPlayer(playerid, BANCOBG[6]);
  603.         TextDrawHideForPlayer(playerid, BANCOBG[7]);
  604.         TextDrawHideForPlayer(playerid, BANCOBG[8]);
  605.         TextDrawHideForPlayer(playerid, BANCOBG[9]);
  606.         TextDrawHideForPlayer(playerid, BANCOBG[10]);
  607.         TextDrawHideForPlayer(playerid, BANCOBG[11]);
  608.         TextDrawHideForPlayer(playerid, BANCOBG[12]);
  609.         TextDrawHideForPlayer(playerid, BANCOBG[13]);
  610.         TextDrawHideForPlayer(playerid, BANCOBG[14]);
  611.         CancelSelectTextDraw(playerid);
  612.         return 1;
  613.     }
  614.     if(clickedid == MAIN[14]) return ShowPlayerDialog(playerid, DIALOG_DEPOSITAR, DIALOG_STYLE_INPUT, "Depositar", "Insira a quantiade que deseja depositar.", "Depositar", "Cancelar");
  615.     if(clickedid == MAIN[15]) return ShowPlayerDialog(playerid, DIALOG_SACAR, DIALOG_STYLE_INPUT, "Sacar", "Insira a quantiade que deseja sacar.", "Sacar", "Cancelar");
  616.     if(clickedid == MAIN[16]) return Mostrarsaldo(playerid);
  617.     if(clickedid == MAIN[17]) return ShowPlayerDialog(playerid, DIALOG_IDTRANSFERIR, DIALOG_STYLE_INPUT, "Transferir", "ID do player que você deseja fazer a transferência bancária :", "Proximo", "Cancelar");
  618.     if(clickedid == MAIN[18]) return Fecharbanco(playerid);
  619.     return 1;
  620. }
  621.  
  622. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  623. {
  624.     if(playertextid == PSALDO[4][playerid]) return Fecharsaldo(playerid);
  625.     return 1;
  626. }
  627.  
  628. public OnPlayerText(playerid, text[])
  629. {
  630.     return 1;
  631. }
  632.  
  633. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  634. {
  635.     if ((newkeys==KEY_SECONDARY_ATTACK))
  636.     {
  637.         cmd_banco(playerid, "/banco");
  638.     }
  639.     return 1;
  640. }
  641.  
  642. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  643. {
  644.     switch(dialogid)
  645.     {
  646.         case DIALOG_REGISTRO:
  647.         {
  648.             if (!response) return 1;
  649.             if (response)
  650.             {
  651.                 format(Arquivo, 50, "Banco/Contas/%s.ini", Playername(playerid));
  652.                 DOF2_CreateFile(Arquivo);
  653.                 DOF2_SetString(Arquivo, "Senha", inputtext);
  654.                 DOF2_SaveFile();
  655.                 new len = strlen(inputtext);
  656.                 if (len < 5 || len > 20) return ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_INPUT, "BANCO", "Senha deve conter no minimo 5 caracteres.", "Entrar", "Sair");
  657.                 SendClientMessage(playerid, 0xFF0000A, "Conta criada com sucesso.");
  658.             }
  659.         }
  660.         case DIALOG_LOGIN:
  661.         {
  662.             if (!response) return 1;
  663.             if (response)
  664.             {
  665.                 format(Arquivo, 50, "Banco/Contas/%s.ini", Playername(playerid));
  666.                 format(Senha, 20, "%s", strval(inputtext));
  667.                 if (strcmp(inputtext, DOF2_GetString(Arquivo, "Senha"), true) == 0)
  668.                 {
  669.                     if (!strlen(inputtext))
  670.                     {
  671.                         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "BANCO", "Senha errada, digite a senha correta para logar-se.", "Entrar", "Sair");
  672.                         return SendClientMessage(playerid, 0xFF0000AA, "Senha incorreta, digite novamente!!!");
  673.                     }
  674.                     SendClientMessage(playerid, 0xFF0000A, "Logado com sucesso."); // logou
  675.                     // esconder o registro/login se a senha for correta
  676.                     TextDrawHideForPlayer(playerid, BANCOBG[0]);
  677.                     TextDrawHideForPlayer(playerid, BANCOBG[1]);
  678.                     TextDrawHideForPlayer(playerid, BANCOBG[2]);
  679.                     TextDrawHideForPlayer(playerid, BANCOBG[3]);
  680.                     TextDrawHideForPlayer(playerid, BANCOBG[4]);
  681.                     TextDrawHideForPlayer(playerid, BANCOBG[5]);
  682.                     TextDrawHideForPlayer(playerid, BANCOBG[6]);
  683.                     TextDrawHideForPlayer(playerid, BANCOBG[7]);
  684.                     TextDrawHideForPlayer(playerid, BANCOBG[8]);
  685.                     TextDrawHideForPlayer(playerid, BANCOBG[9]);
  686.                     TextDrawHideForPlayer(playerid, BANCOBG[10]);
  687.                     TextDrawHideForPlayer(playerid, BANCOBG[11]);
  688.                     TextDrawHideForPlayer(playerid, BANCOBG[12]);
  689.                     TextDrawHideForPlayer(playerid, BANCOBG[13]);
  690.                     TextDrawHideForPlayer(playerid, BANCOBG[14]);
  691.                     CancelSelectTextDraw(playerid);
  692.                     // mostrar o banco se a senha for correta
  693.                     Mostrarbanco(playerid);
  694.                 }
  695.                 else
  696.                 {
  697.                     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "BANCO", "Senha errada, insira a senha correta.", "Entrar", "Sair");
  698.                     SendClientMessage(playerid, 0xFF0000AA, "Senha incorreta, digite novamente!!!");
  699.                 }
  700.             }
  701.         }
  702.         case DIALOG_DEPOSITAR:
  703.         {
  704.             if(response)
  705.             {
  706.                 Quantia = strval(inputtext);
  707.                 if(Quantia > GetPlayerMoney(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "• Você não pode depositar mais do que tem.");
  708.                 if(Quantia == 0) return SendClientMessage(playerid, 0xFF0000AA, "• Você não depositou nada.");
  709.                 GivePlayerMoney(playerid, -Quantia);
  710.                 pInfo[playerid][Saldo] = pInfo[playerid][Saldo] +Quantia;
  711.                 format(String, sizeof(String), "• Voçe depositou $%d", Quantia);
  712.                 SendClientMessage(playerid, 0xFF0000A, String);
  713.                 format(String, sizeof(String), "• Seu novo saldo bancário é de $%d ", pInfo[playerid][Saldo]);
  714.                 SendClientMessage(playerid, 0xFF0000A, String);
  715.                 SalvarDados(playerid);
  716.             }
  717.         }
  718.         case DIALOG_SACAR:
  719.         {
  720.             if(response)
  721.             {
  722.                 Quantia = strval(inputtext);
  723.                 if(Quantia > pInfo[playerid][Saldo]) return SendClientMessage(playerid, 0xFF0000AA, "• Você não pode sacar mais do que tem em sua conta bancaria.");
  724.                 if(Quantia == 0) return SendClientMessage(playerid, 0xFF0000AA, "• Você não sacou nada.");
  725.                 GivePlayerMoney(playerid, Quantia);
  726.                 pInfo[playerid][Saldo] = pInfo[playerid][Saldo] -Quantia;
  727.                 format(String, sizeof(String), "• Você sacou $%d", Quantia);
  728.                 SendClientMessage(playerid, 0xFF0000AA, String);
  729.                 format(String, sizeof(String), "• Seu novo saldo bancário é de $%d ", pInfo[playerid][Saldo]);
  730.                 SendClientMessage(playerid, 0xFF0000A, String);
  731.                 SalvarDados(playerid);
  732.             }
  733.         }
  734.         case DIALOG_IDTRANSFERIR:
  735.         {
  736.             if(response)
  737.             {
  738.                 ID = strval(inputtext);
  739.                 if(!IsNumeric(inputtext)) return SendClientMessage(playerid, 0xFF0000AA, "• Digite um ID valido.");
  740.                 if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "• Jogador offline.");
  741.                 ShowPlayerDialog(playerid, DIALOG_TRANSFERIR, DIALOG_STYLE_INPUT, "Transferir", "Quantidade que você deseja transferir :", "Transferir", "Cancelar");
  742.             }
  743.             return 1;
  744.         }
  745.         case DIALOG_TRANSFERIR:
  746.         {
  747.             if(response)
  748.             {
  749.                 Quantia = strval(inputtext);
  750.                 if(Quantia > pInfo[playerid][Saldo]) return SendClientMessage(playerid, 0xFF0000AA, "• Você não tem todo esse dinheiro em sua conta bancaria.");
  751.                 if(Quantia == 0) return SendClientMessage(playerid, 0xFF0000AA, "• Você não pode transferir $ 0 !!");
  752.                 pInfo[playerid][Saldo] = pInfo[playerid][Saldo] -Quantia, pInfo[ID][Saldo] = pInfo[ID][Saldo] +Quantia;
  753.                 format(String, sizeof(String), "• Você transferiu $ %d para o player %s.", Quantia, Playername(ID));
  754.                 SendClientMessage(playerid, 0xFF0000A, String);
  755.                 format(String, sizeof(String), "• Seu novo saldo bancário é de $%d.", pInfo[playerid][Saldo]);
  756.                 SendClientMessage(playerid, 0xFF0000A, String);
  757.                 format(String, sizeof(String), "• Você recebeu uma transferencia bancaria de $ %d do player %s.", Quantia, Playername(playerid));
  758.                 SendClientMessage(ID, 0xFF0000A, String);
  759.                 SalvarDados(playerid);
  760.             }
  761.         }
  762.     }
  763.     return 1;
  764. }
  765.  
  766. forward Mostrarbanco(playerid);
  767. public Mostrarbanco(playerid)
  768. {
  769.     TextDrawShowForPlayer(playerid, MAIN[0]);
  770.     TextDrawShowForPlayer(playerid, MAIN[1]);
  771.     TextDrawShowForPlayer(playerid, MAIN[2]);
  772.     TextDrawShowForPlayer(playerid, MAIN[3]);
  773.     TextDrawShowForPlayer(playerid, MAIN[4]);
  774.     TextDrawShowForPlayer(playerid, MAIN[5]);
  775.     TextDrawShowForPlayer(playerid, MAIN[6]);
  776.     TextDrawShowForPlayer(playerid, MAIN[7]);
  777.     TextDrawShowForPlayer(playerid, MAIN[8]);
  778.     TextDrawShowForPlayer(playerid, MAIN[9]);
  779.     TextDrawShowForPlayer(playerid, MAIN[10]);
  780.     TextDrawShowForPlayer(playerid, MAIN[11]);
  781.     TextDrawShowForPlayer(playerid, MAIN[12]);
  782.     TextDrawShowForPlayer(playerid, MAIN[13]);
  783.     TextDrawShowForPlayer(playerid, MAIN[14]);
  784.     TextDrawShowForPlayer(playerid, MAIN[15]);
  785.     TextDrawShowForPlayer(playerid, MAIN[16]);
  786.     TextDrawShowForPlayer(playerid, MAIN[17]);
  787.     TextDrawShowForPlayer(playerid, MAIN[18]);
  788.     TextDrawShowForPlayer(playerid, MAIN[19]);
  789.     TextDrawShowForPlayer(playerid, MAIN[20]);
  790.     TextDrawShowForPlayer(playerid, MAIN[21]);
  791.     SelectTextDraw(playerid, 0xFF0000AA);
  792.     return 1;
  793. }
  794.  
  795. forward Fecharbanco(playerid);
  796. public Fecharbanco(playerid)
  797. {
  798.     TextDrawHideForPlayer(playerid, MAIN[0]);
  799.     TextDrawHideForPlayer(playerid, MAIN[1]);
  800.     TextDrawHideForPlayer(playerid, MAIN[2]);
  801.     TextDrawHideForPlayer(playerid, MAIN[3]);
  802.     TextDrawHideForPlayer(playerid, MAIN[4]);
  803.     TextDrawHideForPlayer(playerid, MAIN[5]);
  804.     TextDrawHideForPlayer(playerid, MAIN[6]);
  805.     TextDrawHideForPlayer(playerid, MAIN[7]);
  806.     TextDrawHideForPlayer(playerid, MAIN[8]);
  807.     TextDrawHideForPlayer(playerid, MAIN[9]);
  808.     TextDrawHideForPlayer(playerid, MAIN[10]);
  809.     TextDrawHideForPlayer(playerid, MAIN[11]);
  810.     TextDrawHideForPlayer(playerid, MAIN[12]);
  811.     TextDrawHideForPlayer(playerid, MAIN[13]);
  812.     TextDrawHideForPlayer(playerid, MAIN[14]);
  813.     TextDrawHideForPlayer(playerid, MAIN[15]);
  814.     TextDrawHideForPlayer(playerid, MAIN[16]);
  815.     TextDrawHideForPlayer(playerid, MAIN[17]);
  816.     TextDrawHideForPlayer(playerid, MAIN[18]);
  817.     TextDrawHideForPlayer(playerid, MAIN[19]);
  818.     TextDrawHideForPlayer(playerid, MAIN[20]);
  819.     TextDrawHideForPlayer(playerid, MAIN[21]);
  820.     CancelSelectTextDraw(playerid);
  821.     return 1;
  822. }
  823.  
  824. stock Playername(playerid)
  825. {
  826.     new Name[MAX_PLAYER_NAME];
  827.     GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
  828.     return Name;
  829. }
  830.  
  831. SalvarDados(playerid)
  832. {
  833.     format(Arquivo, 40, "Banco/Contas/%s.ini", Playername(playerid));
  834.     if(!DOF2_FileExists(Arquivo)) DOF2_CreateFile(Arquivo);
  835.     DOF2_SetInt(Arquivo, "Saldo", pInfo[playerid][Saldo]);
  836.     return DOF2_SaveFile();
  837. }
  838.  
  839. CarregarDados(playerid)
  840. {
  841.     format(Arquivo, 40, "Banco/Contas/%s.ini", Playername(playerid));
  842.     pInfo[playerid][Saldo] = DOF2_GetInt(Arquivo, "Saldo");
  843.     return 1;
  844. }
  845.  
  846. IsNumeric(const string[])
  847. {
  848.     for (new i = 0, j = strlen(string); i < j; i++)
  849.     {
  850.         if (string[i] > '9' || string[i] < '0') return 0;
  851.     }
  852.     return 1;
  853. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement