Advertisement
bruno_travi

Taser Advanced

Oct 25th, 2014
894
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 42.14 KB | None | 0 0
  1. //================== INCLUDES
  2. #include <a_samp>
  3. #include <zcmd>
  4. #include <sscanf2>
  5. #include <DOF2>
  6.  
  7. #define D_COMPRA 3000
  8. //================== VARS
  9. new Text:TxtTaser[MAX_PLAYERS][16];
  10. new Text:TxtManual[MAX_PLAYERS][20];
  11. new bool:InManual[MAX_PLAYERS];
  12.  
  13. enum tInfo
  14. {
  15.     bool:Taser,
  16.     bool:TaserEmMaos,
  17.     Dardos,
  18.     DardosR,
  19.     Bateria
  20. }
  21.  
  22. new TaserInfo[MAX_PLAYERS][tInfo];
  23.  
  24. new DataPort[MAX_PLAYERS][10][22];
  25. new DataPortDel[MAX_PLAYERS];
  26. new UltimoSave[MAX_PLAYERS];
  27. new bool:PrimeiroSpawn[MAX_PLAYERS];
  28. new TempoReload[MAX_PLAYERS];
  29. new bool:AtingidoTaser[MAX_PLAYERS];
  30. new bool:AtualizouTaser[MAX_PLAYERS];
  31. new bool:SemTaserEmMaos[MAX_PLAYERS];
  32. new Float:lifep[MAX_PLAYERS], Float:coletep[MAX_PLAYERS];
  33.  
  34. //================== FORWARD'S
  35. forward StopTaser(playerid);
  36. forward StopAnim(playerid);
  37. forward RemoveAttach(playerid, slot);
  38. forward ReloadTaser(playerid);
  39. forward ATTaser(playerid, type);
  40. forward ATBateria(playerid);
  41.  
  42. //================== MACROS
  43. new stringf[250];
  44. #define SendFormatMsg(%0,%1,%2,%3) format(stringf, sizeof(stringf),%2,%3) && SendClientMessage(%0, %1, stringf)
  45.  
  46. //================== SA-MP CALLBACK'S
  47. public OnGameModeInit()
  48. {
  49.     Create3DTextLabel("Digite: /comprar para ver\nos itens disponíveis", -1, 312.3958, -166.1394, 999.6010, 10.0, 0);
  50.    
  51.     for(new i; i < MAX_PLAYERS; i++)
  52.     {
  53.         //TEXTDRAW TASER
  54.         TxtTaser[i][0] = TextDrawCreate(140.235229, 355.833312, "LD_SPAC:white");
  55.         TextDrawLetterSize(TxtTaser[i][0], 0.000000, 0.000000);
  56.         TextDrawTextSize(TxtTaser[i][0], 95.529396, 59.500000);
  57.         TextDrawAlignment(TxtTaser[i][0], 1);
  58.         TextDrawColor(TxtTaser[i][0], -1523963137);
  59.         TextDrawSetShadow(TxtTaser[i][0], 0);
  60.         TextDrawSetOutline(TxtTaser[i][0], 0);
  61.         TextDrawFont(TxtTaser[i][0], 4);
  62.  
  63.         TxtTaser[i][1] = TextDrawCreate(152.470520, 341.250152, "Taser Info");
  64.         TextDrawLetterSize(TxtTaser[i][1], 0.449999, 1.600000);
  65.         TextDrawAlignment(TxtTaser[i][1], 1);
  66.         TextDrawColor(TxtTaser[i][1], -1);
  67.         TextDrawSetShadow(TxtTaser[i][1], 0);
  68.         TextDrawSetOutline(TxtTaser[i][1], 1);
  69.         TextDrawBackgroundColor(TxtTaser[i][1], 51);
  70.         TextDrawFont(TxtTaser[i][1], 3);
  71.         TextDrawSetProportional(TxtTaser[i][1], 1);
  72.  
  73.         TxtTaser[i][2] = TextDrawCreate(139.764816, 343.000000, "hud:radar_emmetGun");
  74.         TextDrawLetterSize(TxtTaser[i][2], 0.000000, 0.000000);
  75.         TextDrawTextSize(TxtTaser[i][2], 10.823532, 11.083312);
  76.         TextDrawAlignment(TxtTaser[i][2], 1);
  77.         TextDrawColor(TxtTaser[i][2], -1);
  78.         TextDrawSetShadow(TxtTaser[i][2], 0);
  79.         TextDrawSetOutline(TxtTaser[i][2], 0);
  80.         TextDrawFont(TxtTaser[i][2], 4);
  81.  
  82.         TxtTaser[i][3] = TextDrawCreate(143.117782, 358.583343, "hud:radar_saveGame");
  83.         TextDrawLetterSize(TxtTaser[i][3], 0.000000, 0.000000);
  84.         TextDrawTextSize(TxtTaser[i][3], 10.823532, 11.083312);
  85.         TextDrawAlignment(TxtTaser[i][3], 1);
  86.         TextDrawColor(TxtTaser[i][3], -1);
  87.         TextDrawSetShadow(TxtTaser[i][3], 0);
  88.         TextDrawSetOutline(TxtTaser[i][3], 0);
  89.         TextDrawFont(TxtTaser[i][3], 4);
  90.  
  91.         TxtTaser[i][4] = TextDrawCreate(156.235244, 354.500091, "N/A");
  92.         TextDrawLetterSize(TxtTaser[i][4], 0.296117, 1.675832);
  93.         TextDrawAlignment(TxtTaser[i][4], 1);
  94.         TextDrawColor(TxtTaser[i][4], -1);
  95.         TextDrawSetShadow(TxtTaser[i][4], 0);
  96.         TextDrawSetOutline(TxtTaser[i][4], 1);
  97.         TextDrawBackgroundColor(TxtTaser[i][4], 51);
  98.         TextDrawFont(TxtTaser[i][4], 2);
  99.         TextDrawSetProportional(TxtTaser[i][4], 1);
  100.  
  101.         TxtTaser[i][5] = TextDrawCreate(143.176620, 372.416687, "hud:radar_waypoint");
  102.         TextDrawLetterSize(TxtTaser[i][5], 0.000000, 0.000000);
  103.         TextDrawTextSize(TxtTaser[i][5], 10.823532, 11.083312);
  104.         TextDrawAlignment(TxtTaser[i][5], 1);
  105.         TextDrawColor(TxtTaser[i][5], -1);
  106.         TextDrawSetShadow(TxtTaser[i][5], 0);
  107.         TextDrawSetOutline(TxtTaser[i][5], 0);
  108.         TextDrawFont(TxtTaser[i][5], 4);
  109.  
  110.         TxtTaser[i][6] = TextDrawCreate(156.235198, 368.916748, "0 DARDOS");
  111.         TextDrawLetterSize(TxtTaser[i][6], 0.296117, 1.675832);
  112.         TextDrawAlignment(TxtTaser[i][6], 1);
  113.         TextDrawColor(TxtTaser[i][6], -1);
  114.         TextDrawSetShadow(TxtTaser[i][6], 0);
  115.         TextDrawSetOutline(TxtTaser[i][6], 1);
  116.         TextDrawBackgroundColor(TxtTaser[i][6], 51);
  117.         TextDrawFont(TxtTaser[i][6], 2);
  118.         TextDrawSetProportional(TxtTaser[i][6], 1);
  119.  
  120.         TxtTaser[i][7] = TextDrawCreate(143.235458, 385.666748, "hud:radar_triads");
  121.         TextDrawLetterSize(TxtTaser[i][7], 0.000000, 0.000000);
  122.         TextDrawTextSize(TxtTaser[i][7], 10.823532, 11.083312);
  123.         TextDrawAlignment(TxtTaser[i][7], 1);
  124.         TextDrawColor(TxtTaser[i][7], -7143425);
  125.         TextDrawSetShadow(TxtTaser[i][7], 0);
  126.         TextDrawSetOutline(TxtTaser[i][7], 0);
  127.         TextDrawBackgroundColor(TxtTaser[i][7], -1);
  128.         TextDrawFont(TxtTaser[i][7], 4);
  129.  
  130.         TxtTaser[i][8] = TextDrawCreate(156.235321, 382.750183, "0 RESERVA");
  131.         TextDrawLetterSize(TxtTaser[i][8], 0.296117, 1.675832);
  132.         TextDrawAlignment(TxtTaser[i][8], 1);
  133.         TextDrawColor(TxtTaser[i][8], -1);
  134.         TextDrawSetShadow(TxtTaser[i][8], 0);
  135.         TextDrawSetOutline(TxtTaser[i][8], 1);
  136.         TextDrawBackgroundColor(TxtTaser[i][8], 51);
  137.         TextDrawFont(TxtTaser[i][8], 2);
  138.         TextDrawSetProportional(TxtTaser[i][8], 1);
  139.  
  140.         TxtTaser[i][9] = TextDrawCreate(164.823501, 399.833282, "LD_SPAC:white");
  141.         TextDrawLetterSize(TxtTaser[i][9], 0.000000, 0.000000);
  142.         TextDrawTextSize(TxtTaser[i][9], 45.647068, 12.833312);
  143.         TextDrawAlignment(TxtTaser[i][9], 1);
  144.         TextDrawColor(TxtTaser[i][9], -1);
  145.         TextDrawSetShadow(TxtTaser[i][9], 0);
  146.         TextDrawSetOutline(TxtTaser[i][9], 0);
  147.         TextDrawFont(TxtTaser[i][9], 4);
  148.  
  149.         TxtTaser[i][10] = TextDrawCreate(166.235168, 401.583251, "LD_SPAC:white");
  150.         TextDrawLetterSize(TxtTaser[i][10], 0.000000, 0.000000);
  151.         TextDrawTextSize(TxtTaser[i][10], 5.176467, 9.333312);
  152.         TextDrawAlignment(TxtTaser[i][10], 1);
  153.         TextDrawColor(TxtTaser[i][10], 8781823);
  154.         TextDrawSetShadow(TxtTaser[i][10], 0);
  155.         TextDrawSetOutline(TxtTaser[i][10], 0);
  156.         TextDrawFont(TxtTaser[i][10], 4);
  157.  
  158.         TxtTaser[i][11] = TextDrawCreate(173.823348, 401.416564, "LD_SPAC:white");
  159.         TextDrawLetterSize(TxtTaser[i][11], 0.000000, 0.000000);
  160.         TextDrawTextSize(TxtTaser[i][11], 5.176467, 9.333312);
  161.         TextDrawAlignment(TxtTaser[i][11], 1);
  162.         TextDrawColor(TxtTaser[i][11], 8781823);
  163.         TextDrawSetShadow(TxtTaser[i][11], 0);
  164.         TextDrawSetOutline(TxtTaser[i][11], 0);
  165.         TextDrawFont(TxtTaser[i][11], 4);
  166.  
  167.         TxtTaser[i][12] = TextDrawCreate(181.411499, 401.833221, "LD_SPAC:white");
  168.         TextDrawLetterSize(TxtTaser[i][12], 0.000000, 0.000000);
  169.         TextDrawTextSize(TxtTaser[i][12], 5.176467, 9.333312);
  170.         TextDrawAlignment(TxtTaser[i][12], 1);
  171.         TextDrawColor(TxtTaser[i][12], 8781823);
  172.         TextDrawSetShadow(TxtTaser[i][12], 0);
  173.         TextDrawSetOutline(TxtTaser[i][12], 0);
  174.         TextDrawFont(TxtTaser[i][12], 4);
  175.  
  176.         TxtTaser[i][13] = TextDrawCreate(188.999740, 401.666564, "LD_SPAC:white");
  177.         TextDrawLetterSize(TxtTaser[i][13], 0.000000, 0.000000);
  178.         TextDrawTextSize(TxtTaser[i][13], 5.176467, 9.333312);
  179.         TextDrawAlignment(TxtTaser[i][13], 1);
  180.         TextDrawColor(TxtTaser[i][13], 8781823);
  181.         TextDrawSetShadow(TxtTaser[i][13], 0);
  182.         TextDrawSetOutline(TxtTaser[i][13], 0);
  183.         TextDrawFont(TxtTaser[i][13], 4);
  184.  
  185.         TxtTaser[i][14] = TextDrawCreate(196.587905, 401.499908, "LD_SPAC:white");
  186.         TextDrawLetterSize(TxtTaser[i][14], 0.000000, 0.000000);
  187.         TextDrawTextSize(TxtTaser[i][14], 5.176467, 9.333312);
  188.         TextDrawAlignment(TxtTaser[i][14], 1);
  189.         TextDrawColor(TxtTaser[i][14], 8781823);
  190.         TextDrawSetShadow(TxtTaser[i][14], 0);
  191.         TextDrawSetOutline(TxtTaser[i][14], 0);
  192.         TextDrawFont(TxtTaser[i][14], 4);
  193.  
  194.         TxtTaser[i][15] = TextDrawCreate(204.176055, 401.916595, "LD_SPAC:white");
  195.         TextDrawLetterSize(TxtTaser[i][15], 0.000000, 0.000000);
  196.         TextDrawTextSize(TxtTaser[i][15], 5.176467, 9.333312);
  197.         TextDrawAlignment(TxtTaser[i][15], 1);
  198.         TextDrawColor(TxtTaser[i][15], 8781823);
  199.         TextDrawSetShadow(TxtTaser[i][15], 0);
  200.         TextDrawSetOutline(TxtTaser[i][15], 0);
  201.         TextDrawFont(TxtTaser[i][15], 4);
  202.  
  203.         //--------------------------------------------------------------------------------------------
  204.  
  205.         //TEXTDRAW MANUAL
  206.         TxtManual[i][0] = TextDrawCreate(484.235229, 274.166656, "LD_SPAC:white");
  207.         TextDrawLetterSize(TxtManual[i][0], 0.000000, 0.000000);
  208.         TextDrawTextSize(TxtManual[i][0], 122.823532, 162.749847);
  209.         TextDrawAlignment(TxtManual[i][0], 1);
  210.         TextDrawColor(TxtManual[i][0], -1);
  211.         TextDrawSetShadow(TxtManual[i][0], 0);
  212.         TextDrawSetOutline(TxtManual[i][0], 0);
  213.         TextDrawFont(TxtManual[i][0], 4);
  214.  
  215.         TxtManual[i][1] = TextDrawCreate(486.588226, 277.083343, "LD_SPAC:white");
  216.         TextDrawLetterSize(TxtManual[i][1], 0.000000, 0.000000);
  217.         TextDrawTextSize(TxtManual[i][1], 118.117691, 18.083322);
  218.         TextDrawAlignment(TxtManual[i][1], 1);
  219.         TextDrawColor(TxtManual[i][1], 8650751);
  220.         TextDrawSetShadow(TxtManual[i][1], 0);
  221.         TextDrawSetOutline(TxtManual[i][1], 0);
  222.         TextDrawFont(TxtManual[i][1], 4);
  223.  
  224.         TxtManual[i][2] = TextDrawCreate(487.529510, 275.916595, "Manual Taser");
  225.         TextDrawLetterSize(TxtManual[i][2], 0.360588, 1.868334);
  226.         TextDrawAlignment(TxtManual[i][2], 1);
  227.         TextDrawColor(TxtManual[i][2], -1);
  228.         TextDrawSetShadow(TxtManual[i][2], 0);
  229.         TextDrawSetOutline(TxtManual[i][2], 1);
  230.         TextDrawBackgroundColor(TxtManual[i][2], 5);
  231.         TextDrawFont(TxtManual[i][2], 2);
  232.         TextDrawSetProportional(TxtManual[i][2], 1);
  233.  
  234.         TxtManual[i][3] = TextDrawCreate(488.000000, 314.999786, "hud:radar_saveGame");
  235.         TextDrawLetterSize(TxtManual[i][3], 0.000000, 0.000000);
  236.         TextDrawTextSize(TxtManual[i][3], 9.882339, 9.916671);
  237.         TextDrawAlignment(TxtManual[i][3], 1);
  238.         TextDrawColor(TxtManual[i][3], -1);
  239.         TextDrawSetShadow(TxtManual[i][3], 0);
  240.         TextDrawSetOutline(TxtManual[i][3], 0);
  241.         TextDrawFont(TxtManual[i][3], 4);
  242.  
  243.         TxtManual[i][4] = TextDrawCreate(486.588409, 296.916687, "~d~ Taser Info");
  244.         TextDrawLetterSize(TxtManual[i][4], 0.264588, 1.366667);
  245.         TextDrawAlignment(TxtManual[i][4], 1);
  246.         TextDrawColor(TxtManual[i][4], -1);
  247.         TextDrawSetShadow(TxtManual[i][4], 0);
  248.         TextDrawSetOutline(TxtManual[i][4], 1);
  249.         TextDrawBackgroundColor(TxtManual[i][4], 255);
  250.         TextDrawFont(TxtManual[i][4], 3);
  251.         TextDrawSetProportional(TxtManual[i][4], 1);
  252.  
  253.         TxtManual[i][5] = TextDrawCreate(499.764801, 313.250000, "Informa ultima data de dispardo.");
  254.         TextDrawLetterSize(TxtManual[i][5], 0.182705, 1.279166);
  255.         TextDrawAlignment(TxtManual[i][5], 1);
  256.         TextDrawColor(TxtManual[i][5], -1);
  257.         TextDrawSetShadow(TxtManual[i][5], 0);
  258.         TextDrawSetOutline(TxtManual[i][5], 1);
  259.         TextDrawBackgroundColor(TxtManual[i][5], 255);
  260.         TextDrawFont(TxtManual[i][5], 1);
  261.         TextDrawSetProportional(TxtManual[i][5], 1);
  262.  
  263.         TxtManual[i][6] = TextDrawCreate(487.588256, 329.416442, "hud:radar_waypoint");
  264.         TextDrawLetterSize(TxtManual[i][6], 0.000000, 0.000000);
  265.         TextDrawTextSize(TxtManual[i][6], 9.882339, 9.916671);
  266.         TextDrawAlignment(TxtManual[i][6], 1);
  267.         TextDrawColor(TxtManual[i][6], -1);
  268.         TextDrawSetShadow(TxtManual[i][6], 0);
  269.         TextDrawSetOutline(TxtManual[i][6], 0);
  270.         TextDrawFont(TxtManual[i][6], 4);
  271.  
  272.         TxtManual[i][7] = TextDrawCreate(499.764739, 327.666748, "Informa quantidade de dardos");
  273.         TextDrawLetterSize(TxtManual[i][7], 0.182705, 1.279166);
  274.         TextDrawAlignment(TxtManual[i][7], 1);
  275.         TextDrawColor(TxtManual[i][7], -1);
  276.         TextDrawSetShadow(TxtManual[i][7], 0);
  277.         TextDrawSetOutline(TxtManual[i][7], 1);
  278.         TextDrawBackgroundColor(TxtManual[i][7], 255);
  279.         TextDrawFont(TxtManual[i][7], 1);
  280.         TextDrawSetProportional(TxtManual[i][7], 1);
  281.  
  282.         TxtManual[i][8] = TextDrawCreate(499.823577, 339.750183, "atuais.");
  283.         TextDrawLetterSize(TxtManual[i][8], 0.182705, 1.279166);
  284.         TextDrawAlignment(TxtManual[i][8], 1);
  285.         TextDrawColor(TxtManual[i][8], -1);
  286.         TextDrawSetShadow(TxtManual[i][8], 0);
  287.         TextDrawSetOutline(TxtManual[i][8], 1);
  288.         TextDrawBackgroundColor(TxtManual[i][8], 255);
  289.         TextDrawFont(TxtManual[i][8], 1);
  290.         TextDrawSetProportional(TxtManual[i][8], 1);
  291.  
  292.         TxtManual[i][9] = TextDrawCreate(487.999847, 356.082946, "hud:radar_triads");
  293.         TextDrawLetterSize(TxtManual[i][9], 0.000000, 0.000000);
  294.         TextDrawTextSize(TxtManual[i][9], 9.882339, 9.916671);
  295.         TextDrawAlignment(TxtManual[i][9], 1);
  296.         TextDrawColor(TxtManual[i][9], -1);
  297.         TextDrawSetShadow(TxtManual[i][9], 0);
  298.         TextDrawSetOutline(TxtManual[i][9], 0);
  299.         TextDrawFont(TxtManual[i][9], 4);
  300.  
  301.         TxtManual[i][10] = TextDrawCreate(499.823577, 354.916809, "Informa quantidade de dardos");
  302.         TextDrawLetterSize(TxtManual[i][10], 0.182705, 1.279166);
  303.         TextDrawAlignment(TxtManual[i][10], 1);
  304.         TextDrawColor(TxtManual[i][10], -1);
  305.         TextDrawSetShadow(TxtManual[i][10], 0);
  306.         TextDrawSetOutline(TxtManual[i][10], 1);
  307.         TextDrawBackgroundColor(TxtManual[i][10], 255);
  308.         TextDrawFont(TxtManual[i][10], 1);
  309.         TextDrawSetProportional(TxtManual[i][10], 1);
  310.  
  311.         TxtManual[i][11] = TextDrawCreate(499.882415, 367.000335, "reservas.");
  312.         TextDrawLetterSize(TxtManual[i][11], 0.182705, 1.279166);
  313.         TextDrawAlignment(TxtManual[i][11], 1);
  314.         TextDrawColor(TxtManual[i][11], -1);
  315.         TextDrawSetShadow(TxtManual[i][11], 0);
  316.         TextDrawSetOutline(TxtManual[i][11], 1);
  317.         TextDrawBackgroundColor(TxtManual[i][11], 255);
  318.         TextDrawFont(TxtManual[i][11], 1);
  319.         TextDrawSetProportional(TxtManual[i][11], 1);
  320.  
  321.         TxtManual[i][12] = TextDrawCreate(489.882293, 383.833557, "LD_SPAC:white");
  322.         TextDrawLetterSize(TxtManual[i][12], 0.000000, 0.000000);
  323.         TextDrawTextSize(TxtManual[i][12], 6.117652, 9.333333);
  324.         TextDrawAlignment(TxtManual[i][12], 1);
  325.         TextDrawColor(TxtManual[i][12], 7077887);
  326.         TextDrawSetShadow(TxtManual[i][12], 0);
  327.         TextDrawSetOutline(TxtManual[i][12], 0);
  328.         TextDrawFont(TxtManual[i][12], 4);
  329.  
  330.         TxtManual[i][13] = TextDrawCreate(499.882385, 381.583587, "Informa bateria restante.");
  331.         TextDrawLetterSize(TxtManual[i][13], 0.182705, 1.279166);
  332.         TextDrawAlignment(TxtManual[i][13], 1);
  333.         TextDrawColor(TxtManual[i][13], -1);
  334.         TextDrawSetShadow(TxtManual[i][13], 0);
  335.         TextDrawSetOutline(TxtManual[i][13], 1);
  336.         TextDrawBackgroundColor(TxtManual[i][13], 255);
  337.         TextDrawFont(TxtManual[i][13], 1);
  338.         TextDrawSetProportional(TxtManual[i][13], 1);
  339.  
  340.         TxtManual[i][14] = TextDrawCreate(499.941223, 394.250427, "20 disparos por pino.");
  341.         TextDrawLetterSize(TxtManual[i][14], 0.182705, 1.279166);
  342.         TextDrawAlignment(TxtManual[i][14], 1);
  343.         TextDrawColor(TxtManual[i][14], -1);
  344.         TextDrawSetShadow(TxtManual[i][14], 0);
  345.         TextDrawSetOutline(TxtManual[i][14], 1);
  346.         TextDrawBackgroundColor(TxtManual[i][14], 255);
  347.         TextDrawFont(TxtManual[i][14], 1);
  348.         TextDrawSetProportional(TxtManual[i][14], 1);
  349.  
  350.         TxtManual[i][15] = TextDrawCreate(490.058990, 408.833648, "Reload: Tecla ~y~Y~w~ - MAX: ~y~6 dardos");
  351.         TextDrawLetterSize(TxtManual[i][15], 0.182705, 1.279166);
  352.         TextDrawAlignment(TxtManual[i][15], 1);
  353.         TextDrawColor(TxtManual[i][15], -1);
  354.         TextDrawSetShadow(TxtManual[i][15], 0);
  355.         TextDrawSetOutline(TxtManual[i][15], 1);
  356.         TextDrawBackgroundColor(TxtManual[i][15], 255);
  357.         TextDrawFont(TxtManual[i][15], 1);
  358.         TextDrawSetProportional(TxtManual[i][15], 1);
  359.  
  360.         TxtManual[i][16] = TextDrawCreate(483.882446, 421.999969, "LD_SPAC:white");
  361.         TextDrawLetterSize(TxtManual[i][16], 0.000000, 0.000000);
  362.         TextDrawTextSize(TxtManual[i][16], 122.823577, 15.166655);
  363.         TextDrawAlignment(TxtManual[i][16], 1);
  364.         TextDrawColor(TxtManual[i][16], 8650751);
  365.         TextDrawSetShadow(TxtManual[i][16], 0);
  366.         TextDrawSetOutline(TxtManual[i][16], 0);
  367.         TextDrawFont(TxtManual[i][16], 4);
  368.  
  369.         TxtManual[i][17] = TextDrawCreate(502.117156, 425.249847, "hud:radar_ammugun");
  370.         TextDrawLetterSize(TxtManual[i][17], 0.000000, 0.000000);
  371.         TextDrawTextSize(TxtManual[i][17], -8.941177, 8.166666);
  372.         TextDrawAlignment(TxtManual[i][17], 1);
  373.         TextDrawColor(TxtManual[i][17], -1);
  374.         TextDrawSetShadow(TxtManual[i][17], 0);
  375.         TextDrawSetOutline(TxtManual[i][17], 0);
  376.         TextDrawFont(TxtManual[i][17], 4);
  377.  
  378.         TxtManual[i][18] = TextDrawCreate(588.293395, 425.083404, "hud:radar_ammugun");
  379.         TextDrawLetterSize(TxtManual[i][18], 0.000000, 0.000000);
  380.         TextDrawTextSize(TxtManual[i][18], 8.941176, 8.166666);
  381.         TextDrawAlignment(TxtManual[i][18], 1);
  382.         TextDrawColor(TxtManual[i][18], -1);
  383.         TextDrawSetShadow(TxtManual[i][18], 0);
  384.         TextDrawSetOutline(TxtManual[i][18], 0);
  385.         TextDrawFont(TxtManual[i][18], 4);
  386.  
  387.         TxtManual[i][19] = TextDrawCreate(503.882293, 424.666961, "TASER International, Inc.");
  388.         TextDrawLetterSize(TxtManual[i][19], 0.186470, 1.045831);
  389.         TextDrawAlignment(TxtManual[i][19], 1);
  390.         TextDrawColor(TxtManual[i][19], -1);
  391.         TextDrawSetShadow(TxtManual[i][19], 0);
  392.         TextDrawSetOutline(TxtManual[i][19], 1);
  393.         TextDrawBackgroundColor(TxtManual[i][19], 255);
  394.         TextDrawFont(TxtManual[i][19], 3);
  395.         TextDrawSetProportional(TxtManual[i][19], 1);
  396.     }
  397.     return 1;
  398. }
  399.  
  400. public OnGameModeExit()
  401. {
  402.     DOF2_Exit();
  403.     return 1;
  404. }
  405.  
  406. public OnPlayerConnect(playerid)
  407. {
  408.     PrimeiroSpawn[playerid] = true;
  409.    
  410.     new arqtaser[40], arqdata[40];
  411.     format(arqtaser, sizeof(arqtaser), "/Tasers/%s.ini", Nome(playerid));
  412.     if(DOF2_FileExists(arqtaser))
  413.     {
  414.         PrimeiroSpawn[playerid] = true;
  415.         TaserInfo[playerid][Taser] = DOF2_GetBool(arqtaser, "taser");
  416.         TaserInfo[playerid][TaserEmMaos] = DOF2_GetBool(arqtaser, "em_maos");
  417.         TaserInfo[playerid][Dardos] = DOF2_GetInt(arqtaser, "dardos");
  418.         TaserInfo[playerid][DardosR] = DOF2_GetInt(arqtaser, "dardos_reserva");
  419.         TaserInfo[playerid][Bateria] = DOF2_GetInt(arqtaser, "bateria");
  420.     }
  421.     else
  422.     {
  423.         DOF2_CreateFile(arqtaser);
  424.         DOF2_SetBool(arqtaser, "taser", false);
  425.         DOF2_SetBool(arqtaser, "em_maos", false);
  426.         DOF2_SetInt(arqtaser, "dardos", 0);
  427.         DOF2_SetInt(arqtaser, "dardos_reserva", 0);
  428.         DOF2_SetInt(arqtaser, "bateria", 0);
  429.     }
  430.  
  431.     format(arqdata, sizeof(arqdata), "/DataPort/%s.ini", Nome(playerid));
  432.     new chave[7];
  433.     if(!DOF2_FileExists(arqdata))
  434.     {
  435.         DOF2_CreateFile(arqdata);
  436.         for(new i = 0; i < 10; i++)
  437.         {
  438.             format(chave, sizeof(chave), "Save%d", i+1);
  439.             DOF2_SetString(arqdata, chave, "N/A");
  440.             DataPort[playerid][i] = "N/A";
  441.         }
  442.         DOF2_SetInt(arqdata, "UltimoDel", -1);
  443.         DOF2_SetInt(arqdata, "UltimoSave", -1);
  444.         DataPortDel[playerid] = 0;
  445.         UltimoSave[playerid] = 0;
  446.     }
  447.     else
  448.     {
  449.         new saves[22];
  450.         for(new i; i < 10; i++)
  451.         {
  452.             format(chave, sizeof(chave), "Save%d", i+1);
  453.             format(saves, sizeof(saves), "%s", DOF2_GetString(arqdata, chave));
  454.             DataPort[playerid][i] = saves;
  455.         }
  456.         DataPortDel[playerid] = DOF2_GetInt(arqdata, "UltimoDel");
  457.         UltimoSave[playerid] = DOF2_GetInt(arqdata, "UltimoSave");
  458.     }
  459.     DOF2_SaveFile();
  460.     return 1;
  461. }
  462.  
  463. public OnPlayerDisconnect(playerid, reason)
  464. {
  465.     new arqtaser[40], arqdata[40];
  466.     format(arqtaser, sizeof(arqtaser), "/Tasers/%s.ini", Nome(playerid));
  467.     if(DOF2_FileExists(arqtaser))
  468.     {
  469.         new Arma, Balas;
  470.         GetPlayerWeaponData(playerid, 2, Arma, Balas);
  471.         DOF2_SetBool(arqtaser, "taser", TaserInfo[playerid][Taser]);
  472.         DOF2_SetBool(arqtaser, "em_maos", TaserInfo[playerid][TaserEmMaos]);
  473.         if(Arma == 23) DOF2_SetInt(arqtaser, "dardos", Balas);
  474.         else DOF2_SetInt(arqtaser, "dardos", 0);
  475.         DOF2_SetInt(arqtaser, "dardos_reserva", TaserInfo[playerid][DardosR]);
  476.         DOF2_SetInt(arqtaser, "bateria", TaserInfo[playerid][Bateria]);
  477.     }
  478.  
  479.     format(arqdata, sizeof(arqdata), "/DataPort/%s.ini", Nome(playerid));
  480.     new chave[10];
  481.     if(DOF2_FileExists(arqdata))
  482.     {
  483.         DOF2_CreateFile(arqdata);
  484.         for(new i; i < 10; i++)
  485.         {
  486.             format(chave, sizeof(chave), "Save%d", i+1);
  487.             DOF2_SetString(arqdata, chave, DataPort[playerid][i]);
  488.         }
  489.         DOF2_SetInt(arqdata, "UltimoDel", DataPortDel[playerid]);
  490.         DOF2_SetInt(arqdata, "UltimoSave", UltimoSave[playerid]);
  491.     }
  492.     DOF2_SaveFile();
  493.     return 1;
  494. }
  495.  
  496. public OnPlayerSpawn(playerid)
  497. {
  498.     if(PrimeiroSpawn[playerid])
  499.     {
  500.         PreloadAnims(playerid);
  501.         if(TaserInfo[playerid][TaserEmMaos] && TaserInfo[playerid][Dardos] > 0)
  502.         {
  503.             PrimeiroSpawn[playerid] = false;
  504.             GiveTaser(playerid, TaserInfo[playerid][Dardos]);
  505.             ATTaser(playerid, 2);
  506.             ATBateria(playerid);
  507.         }
  508.         else if(TaserInfo[playerid][TaserEmMaos]) TaserInfo[playerid][TaserEmMaos] = false;
  509.     }
  510.     return 1;
  511. }
  512.  
  513. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  514. {
  515.     if(newkeys & KEY_SECONDARY_ATTACK)
  516.     {
  517.         if(IsPlayerInRangeOfPoint(playerid, 3.0, 1368.6152,-1279.6919,13.5469))
  518.         {
  519.             SetPlayerPos(playerid, 316.3154,-170.2835,999.5938);
  520.             SetPlayerInterior(playerid, 6);
  521.         }
  522.         if(IsPlayerInRangeOfPoint(playerid, 3.0, 316.3154,-170.2835,999.5938))
  523.         {
  524.             SetPlayerPos(playerid, 1368.6152,-1279.6919,13.5469);
  525.             SetPlayerInterior(playerid, 0);
  526.         }
  527.     }
  528.  
  529.     if(newkeys & KEY_NO && InManual[playerid])
  530.     {
  531.         for(new a; a < 20; a++) TextDrawHideForPlayer(playerid, TxtManual[playerid][a]);
  532.         InManual[playerid] = false;
  533.     }
  534.    
  535.     if(newkeys & KEY_YES && TaserInfo[playerid][TaserEmMaos] && GetPlayerWeapon(playerid) == 23)//Pegar munição taser
  536.     {
  537.         if(TaserInfo[playerid][DardosR] < 1) return 1;
  538.         if(GetPlayerAmmo(playerid) >= 6) return 1;
  539.         if(GetPlayerAmmo(playerid) < 6)
  540.         {
  541.             if(TempoReload[playerid] > GetTickCount()) return 1;
  542.             if(newkeys & KEY_HANDBRAKE == KEY_HANDBRAKE && oldkeys & KEY_HANDBRAKE) return 1;
  543.             ApplyAnimation(playerid, "COLT45", "colt45_reload", 4.1, 0, 1, 1, 1, 1, 1);
  544.             GiveTaser(playerid, 1);
  545.             TaserInfo[playerid][Dardos]++;
  546.             TaserInfo[playerid][DardosR] --;
  547.             SetTimerEx("ReloadTaser", 800, false, "i", playerid);
  548.             TempoReload[playerid] = GetTickCount() + 1000;
  549.             ATTaser(playerid, 2);
  550.             ATBateria(playerid);
  551.         }
  552.     }
  553.     return 1;
  554. }
  555.  
  556. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  557. {
  558.     switch(dialogid)
  559.     {
  560.         case D_COMPRA:
  561.         {
  562.             if(!response) return 1;
  563.             switch(listitem)
  564.             {
  565.                 case 0: ShowPlayerDialog(playerid, D_COMPRA+1, DIALOG_STYLE_MSGBOX, "Comprar Item", "{FFFF00}Produto: {FFFFFF}Taser\n{FFFF00}Dardos: {FFFFFF}20\n{FFFF00}Bateria: {FFFFFF}120\n{FFFF00}Valor: {00FF40}R$ 1000", "Comprar", "Cancelar");
  566.  
  567.                 case 1: ShowPlayerDialog(playerid, D_COMPRA+2, DIALOG_STYLE_MSGBOX, "Comprar Item", "{FFFF00}Produto: {FFFFFF}Bateria\n{FFFF00}Carga: {FFFFFF}100%\n{FFFF00}Valor: {00FF40}R$ 250", "Comprar", "Cancelar");
  568.  
  569.                 case 2: ShowPlayerDialog(playerid, D_COMPRA+3, DIALOG_STYLE_MSGBOX, "Comprar Item", "{FFFF00}Produto: {FFFFFF}Dardos\n{FFFF00}Quantia: {FFFFFF}10\n{FFFF00}Valor: {00FF40}R$ 600", "Comprar", "Cancelar");
  570.             }
  571.         }
  572.  
  573.         case D_COMPRA+1:
  574.         {
  575.             if(!response) return 1;
  576.             if(TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "ERRO: Você já possui um taser!");
  577.             if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "ERRO: Você não possui dinheiro suficiente");
  578.             GiveTaser(playerid, 6, true);
  579.             TaserInfo[playerid][DardosR] = 14;
  580.             TaserInfo[playerid][Bateria] = 120;
  581.             SendClientMessage(playerid, 0x00FF40AA, "Parabéns pela sua compra! Use: /manual");
  582.         }
  583.  
  584.         case D_COMPRA+2:
  585.         {
  586.             if(!response) return 1;
  587.             if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "ERRO: Você não possui um taser!");
  588.             if(TaserInfo[playerid][Bateria] >= 120) return SendClientMessage(playerid, -1, "ERRO: Sua bateria está cheia!");
  589.             if(GetPlayerMoney(playerid) < 250) return SendClientMessage(playerid, -1, "ERRO: Você não possui dinheiro suficiente");
  590.             TaserInfo[playerid][Bateria] = 120;
  591.             ATBateria(playerid);
  592.             SendClientMessage(playerid, 0x00FF40AA, "Parabéns pela sua compra! Bateria renovada");
  593.         }
  594.  
  595.         case D_COMPRA+3:
  596.         {
  597.             if(!response) return 1;
  598.             if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser!");
  599.             if(TaserInfo[playerid][DardosR] >= 50 || TaserInfo[playerid][DardosR]+10 >= 50) return SendClientMessage(playerid, -1, "Você não pode mais guardar dardos com você");
  600.             if(GetPlayerMoney(playerid) < 600) return SendClientMessage(playerid, -1, "Você não possui dinheiro suficiente");
  601.             TaserInfo[playerid][DardosR] += 10;
  602.             ATTaser(playerid, 2);
  603.             SendClientMessage(playerid, 0x00FF40AA, "Parabéns pela sua compra! +10 dardos");
  604.         }
  605.     }
  606.     return 1;
  607. }
  608.  
  609. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  610. {
  611.     if(TaserInfo[playerid][TaserEmMaos] == true && weaponid == 23)
  612.     {
  613.         new Ano, Mes, Dia, Hora, Min, Seg, data[22], bool:saved;
  614.         SetPlayerAttachedObject(playerid, 5, 18717, 6, -1.274216, 0.031086, -0.154675, 359.692840, 79.821006, 0.000000, 1.000000, 1.000000, 1.000000); // prt_spark - Efeito do dardo taser
  615.         SetTimerEx("RemoveAttach", 400, false, "ii", playerid, 5);
  616.         TaserInfo[playerid][Dardos] = GetPlayerAmmo(playerid)-1;
  617.         if(TaserInfo[playerid][Dardos] == 0) TaserInfo[playerid][TaserEmMaos] = false;
  618.  
  619.         getdate(Ano, Mes, Dia); gettime(Hora, Min, Seg);
  620.         format(data, sizeof(data), "%02d/%02d/%d - %02d:%02d:%02d", Dia, Mes, Ano, Hora, Min, Seg);
  621.         for(new i; i < 10; i++)
  622.         {
  623.             if(!strcmp(DataPort[playerid][i], "N/A"))
  624.             {
  625.                 DataPort[playerid][i] = data;
  626.                 UltimoSave[playerid] = i;
  627.                 saved = true;
  628.                 break;
  629.             }
  630.         }
  631.         if(!saved)
  632.         {
  633.             new ultimo = DataPortDel[playerid];
  634.             if(ultimo == 9) ultimo = -1;
  635.             DataPortDel[playerid] = ultimo+1;
  636.             DataPort[playerid][ultimo+1] = data;
  637.             UltimoSave[playerid] = ultimo+1;
  638.         }
  639.         TaserInfo[playerid][Bateria]--;
  640.         ATBateria(playerid);
  641.         ATTaser(playerid, 2);
  642.     }
  643.     return 1;
  644. }
  645.  
  646. public OnPlayerUpdate(playerid)
  647. {
  648.     ATTaser(playerid, 1);
  649.     return 1;
  650. }
  651.  
  652. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
  653. {
  654.     GetPlayerHealth(damagedid, lifep[damagedid]);
  655.     GetPlayerArmour(damagedid, coletep[damagedid]);
  656.  
  657.     if(TaserInfo[playerid][TaserEmMaos] && weaponid == 23)
  658.     {
  659.         SetPlayerHealth(damagedid, lifep[damagedid]); SetPlayerArmour(damagedid, coletep[damagedid]);
  660.  
  661.         if(AtingidoTaser[damagedid]) return 1;
  662.         AtingidoTaser[damagedid] = true;
  663.         TogglePlayerControllable(damagedid, false);
  664.         new rand = random(2);
  665.         if(rand == 0) ApplyAnimation(damagedid, "KNIFE", "knife_hit_3", 4.1, 0, 1, 1, 1, 1, 1);
  666.         if(rand == 1) ApplyAnimation(damagedid, "CRACK", "crckdeth1", 4.1, 0, 1, 1, 1, 1, 1);
  667.         SetTimerEx("StopTaser", 10000, false, "i", damagedid);
  668.     }
  669.     return 1;
  670. }
  671.  
  672. //================== MY CALLBACK'S
  673. public StopTaser(playerid)
  674. {
  675.     TogglePlayerControllable(playerid, true);
  676.     AtingidoTaser[playerid] = false;
  677.     ApplyAnimation(playerid, "Attractors", "Stepsit_out", 4.1, 0, 1, 1, 1, 1, 1); //levantar chão
  678.     SetTimerEx("StopAnim", 800, false, "i", playerid);
  679. }
  680.  
  681. public StopAnim(playerid) return ApplyAnimation(playerid, "BD_FIRE", "BD_Fire1", 4.1, 0, 1, 1, 1, 1, 1);
  682.  
  683. public RemoveAttach(playerid, slot)
  684. {
  685.     if(IsPlayerAttachedObjectSlotUsed(playerid, slot)) RemovePlayerAttachedObject(playerid, slot);
  686.     return 1;
  687. }
  688.  
  689. public ReloadTaser(playerid)
  690. {
  691.     ApplyAnimation(playerid, "BD_FIRE", "BD_Fire1", 4.1, 0, 1, 1, 1, 1, 1);
  692. }
  693.  
  694. public ATTaser(playerid, type)
  695. {
  696.     switch(type)
  697.     {
  698.         case 1:
  699.         {
  700.             if(AtualizouTaser[playerid] && !TaserInfo[playerid][TaserEmMaos])
  701.             {
  702.                 for(new a; a < sizeof(TxtTaser); a++) TextDrawHideForPlayer(playerid, TxtTaser[playerid][a]);
  703.                 AtualizouTaser[playerid] = false;
  704.                 return 1;
  705.             }
  706.             if(GetPlayerWeapon(playerid) != 23 && TaserInfo[playerid][TaserEmMaos] && !SemTaserEmMaos[playerid])
  707.             {
  708.                 SemTaserEmMaos[playerid] = true;
  709.                 for(new a; a < 16; a++) TextDrawHideForPlayer(playerid, TxtTaser[playerid][a]);
  710.             }
  711.             else if(GetPlayerWeapon(playerid) == 23 && TaserInfo[playerid][TaserEmMaos] && SemTaserEmMaos[playerid])
  712.             {
  713.                 SemTaserEmMaos[playerid] = false;
  714.                 for(new a; a < 16; a++) TextDrawShowForPlayer(playerid, TxtTaser[playerid][a]);
  715.             }
  716.         }
  717.  
  718.         case 2:
  719.         {
  720.             if(!TaserInfo[playerid][TaserEmMaos]) return 1;
  721.             AtualizouTaser[playerid] = true;
  722.             new str[11];
  723.             format(str, sizeof(str), "%s", DataPort[playerid][UltimoSave[playerid]]);
  724.             TextDrawSetString(TxtTaser[playerid][4], str);
  725.  
  726.             format(str, sizeof(str), "%d DARDOS", TaserInfo[playerid][Dardos]);
  727.             TextDrawSetString(TxtTaser[playerid][6], str);
  728.  
  729.             format(str, sizeof(str), "%d RESERVA", TaserInfo[playerid][DardosR]);
  730.             TextDrawSetString(TxtTaser[playerid][8], str);
  731.         }
  732.     }
  733.     return 1;
  734. }
  735.  
  736. public ATBateria(playerid)
  737. {
  738.     new bateria = TaserInfo[playerid][Bateria];
  739.     if(bateria > 100) for(new i = 10; i < 16; i++) TextDrawColor(TxtTaser[playerid][i], 8781823);
  740.     else if(bateria < 100 && bateria > 80) TextDrawColor(TxtTaser[playerid][15], 0xFFFFFF00);
  741.     else if(bateria < 80 && bateria > 60) RemovePino(playerid, 14), TextDrawColor(TxtTaser[playerid][14], 0xFFFFFF00);
  742.     else if(bateria < 60 && bateria > 40) RemovePino(playerid, 13), TextDrawColor(TxtTaser[playerid][13], 0xFFFFFF00);
  743.     else if(bateria < 40 && bateria > 20) RemovePino(playerid, 12), TextDrawColor(TxtTaser[playerid][12], 0xFFFFFF00);
  744.     else if(bateria < 20 && bateria > 5) RemovePino(playerid, 11), TextDrawColor(TxtTaser[playerid][11], 0xFFFFFF00);
  745.     else if(bateria < 5 && bateria > 0) RemovePino(playerid, 10), TextDrawColor(TxtTaser[playerid][10], 0xD62222FF);
  746.     else if(bateria < 1)
  747.     {
  748.         RemovePino(playerid, 10);
  749.         TextDrawColor(TxtTaser[playerid][10], 0xFFFFFF00);
  750.         RemovePlayerWeapon(playerid, 23);
  751.         TaserInfo[playerid][TaserEmMaos] = false;
  752.         SendClientMessage(playerid, -1, "A bateria de seu taser terminou, adquira uma nova");
  753.         PlayerPlaySound(playerid, 1085, 0, 0, 0);
  754.     }
  755.  
  756.     if(TaserInfo[playerid][TaserEmMaos] && !SemTaserEmMaos[playerid]) for(new i = 10; i < 16; i++) TextDrawShowForPlayer(playerid, TxtTaser[playerid][i]);
  757.     return 1;
  758. }
  759.  
  760. //================== MY STOCK'S
  761. stock RemovePino(playerid, id)
  762. {
  763.     for(new i = 10; i < 16; i++)
  764.     {
  765.         if(i < id+1) continue;//i < id ou i == id pula linha baixo
  766.         TextDrawColor(TxtTaser[playerid][i], 0xFFFFFF00);
  767.     }
  768.     return 1;
  769. }
  770.  
  771. stock GiveTaser(playerid, ammo, var = false)
  772. {
  773.     if(ammo < 0) return 0;
  774.     GivePlayerWeapon(playerid, 23, ammo);
  775.     if(var) TaserInfo[playerid][Taser] = true;
  776.     return 1;
  777. }
  778.  
  779. stock PreloadAnims(playerid)//Anti bug animes :D
  780. {
  781.     ApplyAnimation(playerid, "AIRPORT", "null", 0.0, 0, 0, 0, 0, 0);
  782.     ApplyAnimation(playerid, "Attractors", "null", 0.0, 0, 0, 0, 0, 0);
  783.     ApplyAnimation(playerid, "BAR", "null", 0.0, 0, 0, 0, 0, 0);
  784.     ApplyAnimation(playerid, "BASEBALL", "null", 0.0, 0, 0, 0, 0, 0);
  785.     ApplyAnimation(playerid, "BD_FIRE", "null", 0.0, 0, 0, 0, 0, 0);
  786.     ApplyAnimation(playerid, "BEACH", "null", 0.0, 0, 0, 0, 0, 0);
  787.     ApplyAnimation(playerid, "benchpress", "null", 0.0, 0, 0, 0, 0, 0);
  788.     ApplyAnimation(playerid, "BF_injection", "null", 0.0, 0, 0, 0, 0, 0);
  789.     ApplyAnimation(playerid, "BIKED", "null", 0.0, 0, 0, 0, 0, 0);
  790.     ApplyAnimation(playerid, "BIKEH", "null", 0.0, 0, 0, 0, 0, 0);
  791.     ApplyAnimation(playerid, "BIKELEAP", "null", 0.0, 0, 0, 0, 0, 0);
  792.     ApplyAnimation(playerid, "BIKES", "null", 0.0, 0, 0, 0, 0, 0);
  793.     ApplyAnimation(playerid, "BIKEV", "null", 0.0, 0, 0, 0, 0, 0);
  794.     ApplyAnimation(playerid, "BIKE_DBZ", "null", 0.0, 0, 0, 0, 0, 0);
  795.     ApplyAnimation(playerid, "BMX", "null", 0.0, 0, 0, 0, 0, 0);
  796.     ApplyAnimation(playerid, "BOMBER", "null", 0.0, 0, 0, 0, 0, 0);
  797.     ApplyAnimation(playerid, "BOX", "null", 0.0, 0, 0, 0, 0, 0);
  798.     ApplyAnimation(playerid, "BSKTBALL", "null", 0.0, 0, 0, 0, 0, 0);
  799.     ApplyAnimation(playerid, "BUDDY", "null", 0.0, 0, 0, 0, 0, 0);
  800.     ApplyAnimation(playerid, "BUS", "null", 0.0, 0, 0, 0, 0, 0);
  801.     ApplyAnimation(playerid, "CAMERA", "null", 0.0, 0, 0, 0, 0, 0);
  802.     ApplyAnimation(playerid, "CAR", "null", 0.0, 0, 0, 0, 0, 0);
  803.     ApplyAnimation(playerid, "CARRY", "null", 0.0, 0, 0, 0, 0, 0);
  804.     ApplyAnimation(playerid, "CAR_CHAT", "null", 0.0, 0, 0, 0, 0, 0);
  805.     ApplyAnimation(playerid, "CASINO", "null", 0.0, 0, 0, 0, 0, 0);
  806.     ApplyAnimation(playerid, "CHAINSAW", "null", 0.0, 0, 0, 0, 0, 0);
  807.     ApplyAnimation(playerid, "CHOPPA", "null", 0.0, 0, 0, 0, 0, 0);
  808.     ApplyAnimation(playerid, "CLOTHES", "null", 0.0, 0, 0, 0, 0, 0);
  809.     ApplyAnimation(playerid, "COACH", "null", 0.0, 0, 0, 0, 0, 0);
  810.     ApplyAnimation(playerid, "COLT45", "null", 0.0, 0, 0, 0, 0, 0);
  811.     ApplyAnimation(playerid, "COP_AMBIENT", "null", 0.0, 0, 0, 0, 0, 0);
  812.     ApplyAnimation(playerid, "COP_DVBYZ", "null", 0.0, 0, 0, 0, 0, 0);
  813.     ApplyAnimation(playerid, "CRACK", "null", 0.0, 0, 0, 0, 0, 0);
  814.     ApplyAnimation(playerid, "CRIB", "null", 0.0, 0, 0, 0, 0, 0);
  815.     ApplyAnimation(playerid, "DAM_JUMP", "null", 0.0, 0, 0, 0, 0, 0);
  816.     ApplyAnimation(playerid, "DANCING", "null", 0.0, 0, 0, 0, 0, 0);
  817.     ApplyAnimation(playerid, "DEALER", "null", 0.0, 0, 0, 0, 0, 0);
  818.     ApplyAnimation(playerid, "DILDO", "null", 0.0, 0, 0, 0, 0, 0);
  819.     ApplyAnimation(playerid, "DODGE", "null", 0.0, 0, 0, 0, 0, 0);
  820.     ApplyAnimation(playerid, "DOZER", "null", 0.0, 0, 0, 0, 0, 0);
  821.     ApplyAnimation(playerid, "DRIVEBYS", "null", 0.0, 0, 0, 0, 0, 0);
  822.     ApplyAnimation(playerid, "FAT", "null", 0.0, 0, 0, 0, 0, 0);
  823.     ApplyAnimation(playerid, "FIGHT_B", "null", 0.0, 0, 0, 0, 0, 0);
  824.     ApplyAnimation(playerid, "FIGHT_C", "null", 0.0, 0, 0, 0, 0, 0);
  825.     ApplyAnimation(playerid, "FIGHT_D", "null", 0.0, 0, 0, 0, 0, 0);
  826.     ApplyAnimation(playerid, "FIGHT_E", "null", 0.0, 0, 0, 0, 0, 0);
  827.     ApplyAnimation(playerid, "FINALE", "null", 0.0, 0, 0, 0, 0, 0);
  828.     ApplyAnimation(playerid, "FINALE2", "null", 0.0, 0, 0, 0, 0, 0);
  829.     ApplyAnimation(playerid, "FLAME", "null", 0.0, 0, 0, 0, 0, 0);
  830.     ApplyAnimation(playerid, "Flowers", "null", 0.0, 0, 0, 0, 0, 0);
  831.     ApplyAnimation(playerid, "FOOD", "null", 0.0, 0, 0, 0, 0, 0);
  832.     ApplyAnimation(playerid, "Freeweights", "null", 0.0, 0, 0, 0, 0, 0);
  833.     ApplyAnimation(playerid, "GANGS", "null", 0.0, 0, 0, 0, 0, 0);
  834.     ApplyAnimation(playerid, "GHANDS", "null", 0.0, 0, 0, 0, 0, 0);
  835.     ApplyAnimation(playerid, "GHETTO_DB", "null", 0.0, 0, 0, 0, 0, 0);
  836.     ApplyAnimation(playerid, "goggles", "null", 0.0, 0, 0, 0, 0, 0);
  837.     ApplyAnimation(playerid, "GRAFFITI", "null", 0.0, 0, 0, 0, 0, 0);
  838.     ApplyAnimation(playerid, "GRAVEYARD", "null", 0.0, 0, 0, 0, 0, 0);
  839.     ApplyAnimation(playerid, "GRENADE", "null", 0.0, 0, 0, 0, 0, 0);
  840.     ApplyAnimation(playerid, "GYMNASIUM", "null", 0.0, 0, 0, 0, 0, 0);
  841.     ApplyAnimation(playerid, "HAIRCUTS", "null", 0.0, 0, 0, 0, 0, 0);
  842.     ApplyAnimation(playerid, "HEIST9", "null", 0.0, 0, 0, 0, 0, 0);
  843.     ApplyAnimation(playerid, "INT_HOUSE", "null", 0.0, 0, 0, 0, 0, 0);
  844.     ApplyAnimation(playerid, "INT_OFFICE", "null", 0.0, 0, 0, 0, 0, 0);
  845.     ApplyAnimation(playerid, "INT_SHOP", "null", 0.0, 0, 0, 0, 0, 0);
  846.     ApplyAnimation(playerid, "JST_BUISNESS", "null", 0.0, 0, 0, 0, 0, 0);
  847.     ApplyAnimation(playerid, "KART", "null", 0.0, 0, 0, 0, 0, 0);
  848.     ApplyAnimation(playerid, "KISSING", "null", 0.0, 0, 0, 0, 0, 0);
  849.     ApplyAnimation(playerid, "KNIFE", "null", 0.0, 0, 0, 0, 0, 0);
  850.     ApplyAnimation(playerid, "LAPDAN1", "null", 0.0, 0, 0, 0, 0, 0);
  851.     ApplyAnimation(playerid, "LAPDAN2", "null", 0.0, 0, 0, 0, 0, 0);
  852.     ApplyAnimation(playerid, "LAPDAN3", "null", 0.0, 0, 0, 0, 0, 0);
  853.     ApplyAnimation(playerid, "LOWRIDER", "null", 0.0, 0, 0, 0, 0, 0);
  854.     ApplyAnimation(playerid, "MD_CHASE", "null", 0.0, 0, 0, 0, 0, 0);
  855.     ApplyAnimation(playerid, "MD_END", "null", 0.0, 0, 0, 0, 0, 0);
  856.     ApplyAnimation(playerid, "MEDIC", "null", 0.0, 0, 0, 0, 0, 0);
  857.     ApplyAnimation(playerid, "MISC", "null", 0.0, 0, 0, 0, 0, 0);
  858.     ApplyAnimation(playerid, "MTB", "null", 0.0, 0, 0, 0, 0, 0);
  859.     ApplyAnimation(playerid, "MUSCULAR", "null", 0.0, 0, 0, 0, 0, 0);
  860.     ApplyAnimation(playerid, "NEVADA", "null", 0.0, 0, 0, 0, 0, 0);
  861.     ApplyAnimation(playerid, "ON_LOOKERS", "null", 0.0, 0, 0, 0, 0, 0);
  862.     ApplyAnimation(playerid, "OTB", "null", 0.0, 0, 0, 0, 0, 0);
  863.     ApplyAnimation(playerid, "PARACHUTE", "null", 0.0, 0, 0, 0, 0, 0);
  864.     ApplyAnimation(playerid, "PARK", "null", 0.0, 0, 0, 0, 0, 0);
  865.     ApplyAnimation(playerid, "PAULNMAC", "null", 0.0, 0, 0, 0, 0, 0);
  866.     ApplyAnimation(playerid, "ped", "null", 0.0, 0, 0, 0, 0, 0);
  867.     ApplyAnimation(playerid, "PLAYER_DVBYS", "null", 0.0, 0, 0, 0, 0, 0);
  868.     ApplyAnimation(playerid, "PLAYIDLES", "null", 0.0, 0, 0, 0, 0, 0);
  869.     ApplyAnimation(playerid, "POLICE", "null", 0.0, 0, 0, 0, 0, 0);
  870.     ApplyAnimation(playerid, "POOL", "null", 0.0, 0, 0, 0, 0, 0);
  871.     ApplyAnimation(playerid, "POOR", "null", 0.0, 0, 0, 0, 0, 0);
  872.     ApplyAnimation(playerid, "PYTHON", "null", 0.0, 0, 0, 0, 0, 0);
  873.     ApplyAnimation(playerid, "QUAD", "null", 0.0, 0, 0, 0, 0, 0);
  874.     ApplyAnimation(playerid, "QUAD_DBZ", "null", 0.0, 0, 0, 0, 0, 0);
  875.     ApplyAnimation(playerid, "RAPPING", "null", 0.0, 0, 0, 0, 0, 0);
  876.     ApplyAnimation(playerid, "RIFLE", "null", 0.0, 0, 0, 0, 0, 0);
  877.     ApplyAnimation(playerid, "RIOT", "null", 0.0, 0, 0, 0, 0, 0);
  878.     ApplyAnimation(playerid, "ROB_BANK", "null", 0.0, 0, 0, 0, 0, 0);
  879.     ApplyAnimation(playerid, "RUSTLER", "null", 0.0, 0, 0, 0, 0, 0);
  880.     ApplyAnimation(playerid, "RYDER", "null", 0.0, 0, 0, 0, 0, 0);
  881.     ApplyAnimation(playerid, "SCRATCHING", "null", 0.0, 0, 0, 0, 0, 0);
  882.     ApplyAnimation(playerid, "SHAMAL", "null", 0.0, 0, 0, 0, 0, 0);
  883.     ApplyAnimation(playerid, "SHOP", "null", 0.0, 0, 0, 0, 0, 0);
  884.     ApplyAnimation(playerid, "SHOTGUN", "null", 0.0, 0, 0, 0, 0, 0);
  885.     ApplyAnimation(playerid, "SILENCED", "null", 0.0, 0, 0, 0, 0, 0);
  886.     ApplyAnimation(playerid, "SKATE", "null", 0.0, 0, 0, 0, 0, 0);
  887.     ApplyAnimation(playerid, "SMOKING", "null", 0.0, 0, 0, 0, 0, 0);
  888.     ApplyAnimation(playerid, "SNIPER", "null", 0.0, 0, 0, 0, 0, 0);
  889.     ApplyAnimation(playerid, "SPRAYCAN", "null", 0.0, 0, 0, 0, 0, 0);
  890.     ApplyAnimation(playerid, "STRIP", "null", 0.0, 0, 0, 0, 0, 0);
  891.     ApplyAnimation(playerid, "SUNBATHE", "null", 0.0, 0, 0, 0, 0, 0);
  892.     ApplyAnimation(playerid, "SWAT", "null", 0.0, 0, 0, 0, 0, 0);
  893.     ApplyAnimation(playerid, "SWEET", "null", 0.0, 0, 0, 0, 0, 0);
  894.     ApplyAnimation(playerid, "SWIM", "null", 0.0, 0, 0, 0, 0, 0);
  895.     ApplyAnimation(playerid, "SWORD", "null", 0.0, 0, 0, 0, 0, 0);
  896.     ApplyAnimation(playerid, "TANK", "null", 0.0, 0, 0, 0, 0, 0);
  897.     ApplyAnimation(playerid, "TATTOOS", "null", 0.0, 0, 0, 0, 0, 0);
  898.     ApplyAnimation(playerid, "TEC", "null", 0.0, 0, 0, 0, 0, 0);
  899.     ApplyAnimation(playerid, "TRAIN", "null", 0.0, 0, 0, 0, 0, 0);
  900.     ApplyAnimation(playerid, "TRUCK", "null", 0.0, 0, 0, 0, 0, 0);
  901.     ApplyAnimation(playerid, "UZI", "null", 0.0, 0, 0, 0, 0, 0);
  902.     ApplyAnimation(playerid, "VAN", "null", 0.0, 0, 0, 0, 0, 0);
  903.     ApplyAnimation(playerid, "VENDING", "null", 0.0, 0, 0, 0, 0, 0);
  904.     ApplyAnimation(playerid, "VORTEX", "null", 0.0, 0, 0, 0, 0, 0);
  905.     ApplyAnimation(playerid, "WAYFARER", "null", 0.0, 0, 0, 0, 0, 0);
  906.     ApplyAnimation(playerid, "WEAPONS", "null", 0.0, 0, 0, 0, 0, 0);
  907.     ApplyAnimation(playerid, "WUZI", "null", 0.0, 0, 0, 0, 0, 0);
  908.     return 1;
  909. }
  910.  
  911. stock Nome(playerid)
  912. {
  913.     new nj[MAX_PLAYER_NAME];
  914.     GetPlayerName(playerid, nj, sizeof(nj));
  915.     return nj;
  916. }
  917.  
  918. stock RemovePlayerWeapon(playerid, weaponid)
  919. {
  920.     new pWeaponData[13][2];
  921.     for (new i = 0; i < 13; i++)
  922.     {
  923.         GetPlayerWeaponData(playerid, i, pWeaponData[i][0], pWeaponData[i][1]);
  924.     }
  925.  
  926.     ResetPlayerWeapons(playerid);
  927.     for(new i; i < 13; i++)
  928.     {
  929.         if(pWeaponData[i][0] != 0 && pWeaponData[i][0] != weaponid)
  930.         {
  931.             GivePlayerWeapon(playerid, pWeaponData[i][0], pWeaponData[i][1]);
  932.         }
  933.     }
  934.     return 1;
  935. }
  936.  
  937. //================== MY COMMANDS
  938. CMD:taser(playerid)
  939. {
  940.     if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser!");
  941.     if(TaserInfo[playerid][TaserEmMaos])
  942.     {
  943.         new Arma, Balas;
  944.         GetPlayerWeaponData(playerid, 2, Arma, Balas);
  945.         TaserInfo[playerid][DardosR] += Balas;
  946.         RemovePlayerWeapon(playerid, 23);
  947.         TaserInfo[playerid][TaserEmMaos] = false;
  948.         return 1;
  949.     }
  950.     if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Você não pode pegar seu taser em um veículo!");
  951.     if(TaserInfo[playerid][DardosR] < 1) return SendClientMessage(playerid, -1, "Você não possui dardos suficientes para equipar seu taser!");
  952.     if(TaserInfo[playerid][Bateria] < 1) return SendClientMessage(playerid, -1, "Seu taser está sem bateria, compre uma nova!");
  953.     TaserInfo[playerid][TaserEmMaos] = true;
  954.     new dardos = TaserInfo[playerid][DardosR];
  955.     if(dardos > 6)
  956.     {
  957.         GiveTaser(playerid, 6);
  958.         TaserInfo[playerid][DardosR] -= 6;
  959.         TaserInfo[playerid][Dardos] = 6;
  960.     }
  961.     else
  962.     {
  963.         GiveTaser(playerid, dardos);
  964.         TaserInfo[playerid][DardosR] -= dardos;
  965.         TaserInfo[playerid][Dardos] = dardos;
  966.     }
  967.     ATBateria(playerid);
  968.     ATTaser(playerid, 2);
  969.     for(new a; a < sizeof(TxtTaser); a++) TextDrawShowForPlayer(playerid, TxtTaser[playerid][a]);
  970.     return 1;
  971. }
  972.  
  973. CMD:dartaser(playerid, params[])
  974. {
  975.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Você não pode usar esse comando!");
  976.     new id, bb, bat;
  977.     if(sscanf(params,"udd", id, bb, bat)) return SendClientMessage(playerid, -1, "Use: /dartaser [id] [dardos] [bateria]");
  978.     TaserInfo[id][Taser] = true;
  979.     TaserInfo[playerid][DardosR] = bb;
  980.     TaserInfo[playerid][Bateria] = bat;
  981.     SendFormatMsg(id, 0x00FF40FF, "%s lhe deu um taser [Dardos: %d | Bateria: %d]", Nome(playerid), bb, bat);
  982.     SendFormatMsg(playerid, -1, "Você deu um taser para %s [Dardos: %d | Bateria: %d]", Nome(id), bb, bat);
  983.     return 1;
  984. }
  985.  
  986. CMD:dataport(playerid)
  987. {
  988.     if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser para acessar seus dados!");
  989.     new str[70], final[500];
  990.     for(new i; i < 10; i++)
  991.     {
  992.         format(str, sizeof(str), "{FFFFFF}Data %d - %s\n", i, DataPort[playerid][i]);
  993.         strcat(final, str);
  994.     }
  995.     ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Dataport", final, "Confirma", "");
  996.     return 1;
  997. }
  998.  
  999. CMD:manual(playerid)
  1000. {
  1001.     if(!TaserInfo[playerid][Taser]) return SendClientMessage(playerid, -1, "Você não possui um taser!");
  1002.     if(InManual[playerid])
  1003.     {
  1004.         for(new a; a < 20; a++) TextDrawHideForPlayer(playerid, TxtManual[playerid][a]);
  1005.         InManual[playerid] = false;
  1006.         return 1;
  1007.     }
  1008.     InManual[playerid] = true;
  1009.     SendClientMessage(playerid, -1, "Para guardar seu manual, tecle N");
  1010.     for(new a; a < 20; a++) TextDrawShowForPlayer(playerid, TxtManual[playerid][a]);
  1011.     return 1;
  1012. }
  1013.  
  1014. CMD:comprar(playerid)
  1015. {
  1016.     if(!IsPlayerInRangeOfPoint(playerid, 5.0, 312.3958, -166.1394, 999.6010)) return SendClientMessage(playerid, -1, "Você não está na loja de armas ou próximo ao balcão!");
  1017.     ShowPlayerDialog(playerid, D_COMPRA, DIALOG_STYLE_LIST, "Loja de armas", "Taser\t\t{00FF40}R$ 1000{FFFFFF}\nBateria\t\t{00FF40}R$ 250{FFFFFF}\nDardos\t\t{00FF40}R$ 600", "Selecionar", "Sair");
  1018.     return 1;
  1019. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement