Advertisement
Brian_D

Gm Truck

May 5th, 2016
549
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 59.34 KB | None | 0 0
  1. //creditos
  2. // criador do gm BrianD
  3.  
  4. //Includes
  5. #include <a_samp>
  6. #include <zcmd>
  7. #include <dof2>
  8. #include <sscanf2>
  9. #include <F_Streamer>
  10. //=======Defines=====
  11. #define DINHEIRO_INICIAL    40000
  12. #define SCORE_INICIAL       0
  13. #define MUSICA_INICIO       "https://www.dropbox.com/s/v44y4uqw086pyzr/Scorpions%20-%20Rock%20You%20Like%20A%20Hurricane%20%28PCM%20Version%29.mp3?dl=1" // sempre mudeo o mp3?dl=0 para mp3?dl=1
  14. #define GM_MODE             "Truck"
  15. #define MAX_VEICULOS        1000
  16. #define A_VELOCIMETRO       100     //Tempo de atualização em milesemos de segundo
  17. #define GASTO_GASOLINA      25000   //tempo para descer 1 litro em milesemos de segundo
  18. #define TEMPO_INICIO        5000
  19. //=======PREÇO=======
  20. #define PRECO_MULE          35000
  21. #define PRECO_YANKEE        40000
  22. #define PRECO_BENSON        25000
  23. #define PRECO_DFT30         70000
  24. #define PRECO_LINERUNNER    120000
  25. #define PRECO_TANKER        140000
  26. //=======CORES=======
  27. #define COLOR_RED           0xFF230AFF
  28. #define COLOR_YELLOW        0xEDED26FF
  29. #define COLOR_GREEN         0x1CD622FF
  30. #define COLOR_BLUE          0x0597F2FF
  31. #define COLOR_PINK          0xF000ECFF
  32. #define COLOR_ORANGE        0xFAAC02FF
  33. #define COLOR_PURPLE        0x9B02FAFF
  34. #define COLOR_WHITE         0xFFFFFFFF
  35. #define COLOR_GREY          0x6B6A67FF
  36. //======DIALOG=======
  37. #define DIALOG_REGISTER     1
  38. #define DIALOG_LOGIN        2
  39. #define DIALOG_SPAWN        3
  40. #define DIALOG_INFO1        4
  41. #define DIALOG_MULE         5
  42. #define DIALOG_YANKEE       6
  43. #define DIALOG_BENSON       7
  44. #define DIALOG_DFT30        8
  45. #define DIALOG_LINERUNNER   9
  46. #define DIALOG_TANKER       10
  47. #define DIALOG_GARAGE1LS    11
  48. #define DIALOG_GARAGE2LS    12
  49. #define DIALOG_GARAGE1LV    13
  50. #define DIALOG_GARAGE2LV    14
  51. #define DIALOG_GARAGE1SF    15
  52. #define DIALOG_GARAGE2SF    16
  53. #define DIALOG_CONCE        17
  54. #define DIALOG_CONCEVENDA   18
  55. //======forward======
  56. forward logando(playerid);
  57. forward comprandocaminhao(playerid);
  58. forward velocidade(playerid);
  59. forward gasolina(playerid);
  60. forward posto(playerid);
  61. forward abastecendo(playerid);
  62. forward clima();
  63. forward carregarradar();
  64. forward checkradar(playerid);
  65. forward reset(playerid);
  66. forward flash(playerid);
  67. //======Variaveis====
  68. new veiculo[MAX_PLAYERS];
  69. new maxcar[MAX_VEICULOS];
  70. new pmule[128];
  71. new pyankee[128];
  72. new pbenson[128];
  73. new pdft[128];
  74. new plinerunner[128];
  75. new ptanker[128];
  76. new vuso[MAX_PLAYERS] = 0;
  77. new padmin[MAX_PLAYERS];
  78. new permissaoadm[MAX_PLAYERS];
  79. new cargasolina[MAX_VEICULOS];
  80. new maxtimer[1000];
  81. new objetoradar[1000];
  82. new Text3D:labelradar[1000];
  83. new Float:rposx[1000];
  84. new Float:rposy[1000];
  85. new Float:rposz[1000];
  86. new Float:rotation[1000];
  87. new Speed[1000];
  88. new bool:jmulta[501];
  89. //======TextDrawn====
  90. new Text:Textdraw0;
  91. new Text:Textdraw1;
  92. new Text:Textdraw2;
  93. new Text:Textdraw3;
  94. new Text:Textdraw4;
  95. new Text:Textdraw5;
  96. new Text:Textdraw6;
  97. new Text:Textdraw7;
  98. //===================
  99. main()
  100. {
  101. }
  102. public OnGameModeInit()
  103. {
  104.     for(new i = 0; i < 1000; i++)
  105.     {
  106.         cargasolina[i] = 100;
  107.     }
  108.     SetTimer("clima", 600000, true);
  109.     DisableInteriorEnterExits();
  110.     carregarradar();
  111.     //TextDrawn
  112.     Textdraw0 = TextDrawCreate(646.500000, 318.459930, "usebox");
  113.     TextDrawLetterSize(Textdraw0, 0.000000, 15.699997);
  114.     TextDrawTextSize(Textdraw0, -2.500000, 0.000000);
  115.     TextDrawAlignment(Textdraw0, 1);
  116.     TextDrawColor(Textdraw0, 255);
  117.     TextDrawUseBox(Textdraw0, true);
  118.     TextDrawBoxColor(Textdraw0, 255);
  119.     TextDrawSetShadow(Textdraw0, 0);
  120.     TextDrawSetOutline(Textdraw0, 0);
  121.     TextDrawBackgroundColor(Textdraw0, 255);
  122.     TextDrawFont(Textdraw0, 0);
  123.  
  124.     Textdraw1 = TextDrawCreate(687.500000, 1.500000, "usebox");
  125.     TextDrawLetterSize(Textdraw1, 0.000000, 0.231110);
  126.     TextDrawTextSize(Textdraw1, -2.000000, 0.000000);
  127.     TextDrawAlignment(Textdraw1, 1);
  128.     TextDrawColor(Textdraw1, 0);
  129.     TextDrawUseBox(Textdraw1, true);
  130.     TextDrawBoxColor(Textdraw1, 255);
  131.     TextDrawSetShadow(Textdraw1, 0);
  132.     TextDrawSetOutline(Textdraw1, 0);
  133.     TextDrawFont(Textdraw1, 0);
  134.    
  135.     Textdraw2 = TextDrawCreate(636.000000, 387.339996, "usebox");
  136.     TextDrawLetterSize(Textdraw2, 0.000000, 3.681111);
  137.     TextDrawTextSize(Textdraw2, 506.000000, 0.000000);
  138.     TextDrawAlignment(Textdraw2, 1);
  139.     TextDrawColor(Textdraw2, 0);
  140.     TextDrawUseBox(Textdraw2, true);
  141.     TextDrawBoxColor(Textdraw2, 102);
  142.     TextDrawSetShadow(Textdraw2, 0);
  143.     TextDrawSetOutline(Textdraw2, 0);
  144.     TextDrawFont(Textdraw2, 0);
  145.  
  146.     Textdraw3 = TextDrawCreate(510.500000, 389.759979, "KM/h:");
  147.     TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
  148.     TextDrawAlignment(Textdraw3, 1);
  149.     TextDrawColor(Textdraw3, -1);
  150.     TextDrawSetShadow(Textdraw3, 0);
  151.     TextDrawSetOutline(Textdraw3, 1);
  152.     TextDrawBackgroundColor(Textdraw3, 51);
  153.     TextDrawFont(Textdraw3, 1);
  154.     TextDrawSetProportional(Textdraw3, 1);
  155.  
  156.     Textdraw4 = TextDrawCreate(557.000000, 389.759948, "valor");
  157.     TextDrawLetterSize(Textdraw4, 0.449999, 1.600000);
  158.     TextDrawAlignment(Textdraw4, 1);
  159.     TextDrawColor(Textdraw4, -2139062017);
  160.     TextDrawSetShadow(Textdraw4, 0);
  161.     TextDrawSetOutline(Textdraw4, 1);
  162.     TextDrawBackgroundColor(Textdraw4, 51);
  163.     TextDrawFont(Textdraw4, 1);
  164.     TextDrawSetProportional(Textdraw4, 1);
  165.  
  166.     Textdraw5 = TextDrawCreate(510.500000, 403.200012, "Gasolina:");
  167.     TextDrawLetterSize(Textdraw5, 0.449999, 1.600000);
  168.     TextDrawAlignment(Textdraw5, 1);
  169.     TextDrawColor(Textdraw5, -1);
  170.     TextDrawSetShadow(Textdraw5, 0);
  171.     TextDrawSetOutline(Textdraw5, 1);
  172.     TextDrawBackgroundColor(Textdraw5, 51);
  173.     TextDrawFont(Textdraw5, 1);
  174.     TextDrawSetProportional(Textdraw5, 1);
  175.  
  176.     Textdraw6 = TextDrawCreate(582.000000, 403.760040, "valorg");
  177.     TextDrawLetterSize(Textdraw6, 0.449999, 1.600000);
  178.     TextDrawAlignment(Textdraw6, 1);
  179.     TextDrawColor(Textdraw6, -2139062017);
  180.     TextDrawSetShadow(Textdraw6, 0);
  181.     TextDrawSetOutline(Textdraw6, 1);
  182.     TextDrawBackgroundColor(Textdraw6, 51);
  183.     TextDrawFont(Textdraw6, 1);
  184.     TextDrawSetProportional(Textdraw6, 1);
  185.    
  186.     Textdraw7 = TextDrawCreate(746.000000, -73.539955, "usebox");
  187.     TextDrawLetterSize(Textdraw7, 0.000000, 65.098876);
  188.     TextDrawTextSize(Textdraw7, -154.500000, 0.000000);
  189.     TextDrawAlignment(Textdraw7, 1);
  190.     TextDrawColor(Textdraw7, 0);
  191.     TextDrawUseBox(Textdraw7, true);
  192.     TextDrawBoxColor(Textdraw7, 1258284921);
  193.     TextDrawSetShadow(Textdraw7, 0);
  194.     TextDrawSetOutline(Textdraw7, 0);
  195.     TextDrawFont(Textdraw7, 1);
  196.     //=====================
  197.     SetGameModeText(GM_MODE);
  198.     maxcar[0] = CreateVehicle(414,2148.7766,1409.4293,10.9145,359.3557,1,1,1); // mulepos
  199.     maxcar[1] = CreateVehicle(456,2139.1135,1410.5844,10.9947,359.8750,1,1,1); // yankeepos
  200.     maxcar[2] = CreateVehicle(499,2129.5378,1409.6095,10.8120,359.7978,1,1,1); // bensonpos
  201.     maxcar[3] = CreateVehicle(578,2119.9146,1411.4460,11.4388,359.5814,1,1,1); // dft-30pos
  202.     maxcar[4] = CreateVehicle(403,2110.3721,1410.2285,11.4264,1.1591,1,1,1); // linerunnerpos
  203.     maxcar[5] = CreateVehicle(514,2100.8567,1411.0819,11.4063,359.0898,1,1,1); // tankerpos
  204.     SetVehicleParamsEx(maxcar[0], 0, 0, 0, 1, 0, 0, 0);
  205.     SetVehicleParamsEx(maxcar[1], 0, 0, 0, 1, 0, 0, 0);
  206.     SetVehicleParamsEx(maxcar[2], 0, 0, 0, 1, 0, 0, 0);
  207.     SetVehicleParamsEx(maxcar[3], 0, 0, 0, 1, 0, 0, 0);
  208.     SetVehicleParamsEx(maxcar[4], 0, 0, 0, 1, 0, 0, 0);
  209.     SetVehicleParamsEx(maxcar[5], 0, 0, 0, 1, 0, 0, 0);
  210.     Create3DTextLabel("GARAGEM 1\nDigite /garagem", COLOR_GREEN, 555.7392,-1293.5319,17.2482, 20, 0, 0);
  211.     Create3DTextLabel("GARAGEM 2\nDigite /garagem", COLOR_GREEN, 531.0724,-1293.5546,17.2422, 20, 0, 0);
  212.     Create3DTextLabel("GARAGEM 1\nDigite /garagem", COLOR_GREEN, 2182.7561,1027.8881,10.8203, 20, 0, 0);
  213.     Create3DTextLabel("GARAGEM 2\nDigite /garagem", COLOR_GREEN, 2187.8994,1014.3012,10.8203, 20, 0, 0);
  214.     Create3DTextLabel("GARAGEM 1\nDigite /garagem", COLOR_GREEN, -2661.3140,1391.8323,7.0994, 20, 0, 0);
  215.     Create3DTextLabel("GARAGEM 2\nDigite /garagem", COLOR_GREEN, -2649.5305,1394.9143,7.0938, 20, 0, 0);
  216.     Create3DTextLabel("Concessionaria\nAperte ENTER", COLOR_GREEN, 2115.0681,1423.4795,10.8203, 20, 0, 0);
  217.     Create3DTextLabel("Guardar Carro\nDigite /GUARDAR", COLOR_GREEN, 2185.4976,1021.1578,10.8203, 20, 0, 0);
  218.     Create3DTextLabel("Guardar Carro\nDigite /GUARDAR", COLOR_GREEN, -2655.5527,1393.5116,7.0938, 20, 0, 0);
  219.     Create3DTextLabel("Guardar Carro\nDigite /GUARDAR", COLOR_GREEN, 542.9576,-1293.9307,17.2422, 20, 0, 0);
  220.     //=============================
  221.     Create3DTextLabel("/abastecer", COLOR_GREEN, 1939.2181,-1773.0911,13.3828, 20, 0, 0);
  222.     Create3DTextLabel("/abastecer", COLOR_GREEN, 1943.7041,-1772.8866,13.3906, 20, 0, 0);
  223.     Create3DTextLabel("/abastecer", COLOR_GREEN, 1004.1920,-939.5379,42.1797, 20, 0, 0);
  224.     Create3DTextLabel("/abastecer", COLOR_GREEN, 1003.5308,-934.4844,42.1797, 20, 0, 0);
  225.     Create3DTextLabel("/abastecer", COLOR_GREEN, 1003.5308,-934.4844,42.1797, 20, 0, 0);
  226.     Create3DTextLabel("/abastecer", COLOR_GREEN, -93.8022,-1175.0951,2.2660, 20, 0, 0);
  227.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1609.3066,-2718.4380,48.5391, 20, 0, 0);
  228.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1605.6553,-2714.4573,48.5335, 20, 0, 0);
  229.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1602.1990,-2710.1804,48.5391, 20, 0, 0);
  230.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1668.7905,420.3757,7.1797, 20, 0, 0);
  231.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1673.3673,415.6530,7.1797, 20, 0, 0);
  232.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1678.7944,410.2278,7.1797, 20, 0, 0);
  233.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1682.7505,406.1461,7.1797, 20, 0, 0);
  234.     Create3DTextLabel("/abastecer", COLOR_GREEN, 2120.8606,918.2867,10.8203, 20, 0, 0);
  235.     Create3DTextLabel("/abastecer", COLOR_GREEN, 2114.6873,918.4413,10.8203, 20, 0, 0);
  236.     Create3DTextLabel("/abastecer", COLOR_GREEN, 2108.9775,918.8206,10.8203, 20, 0, 0);
  237.     Create3DTextLabel("/abastecer", COLOR_GREEN, 2108.8982,928.8802,10.8203, 20, 0, 0);
  238.     Create3DTextLabel("/abastecer", COLOR_GREEN, 2114.6130,928.6480,10.8203, 20, 0, 0);
  239.     Create3DTextLabel("/abastecer", COLOR_GREEN, 2120.6721,928.8079,10.8203, 20, 0, 0);
  240.     Create3DTextLabel("/abastecer", COLOR_GREEN, 605.3086,1704.7125,6.9922, 20, 0, 0);
  241.     Create3DTextLabel("/abastecer", COLOR_GREEN, 608.1713,1700.2024,6.9922, 20, 0, 0);
  242.     Create3DTextLabel("/abastecer", COLOR_GREEN, 611.9305,1694.8732,6.9922, 20, 0, 0);
  243.     Create3DTextLabel("/abastecer", COLOR_GREEN, 615.1508,1689.9467,6.9922, 20, 0, 0);
  244.     Create3DTextLabel("/abastecer", COLOR_GREEN, 618.6849,1684.9962,6.9922, 20, 0, 0);
  245.     Create3DTextLabel("/abastecer", COLOR_GREEN, 622.2836,1679.7192,6.9922, 20, 0, 0);
  246.     Create3DTextLabel("/abastecer", COLOR_GREEN, 652.6727,-570.3786,16.3359, 20, 0, 0);
  247.     Create3DTextLabel("/abastecer", COLOR_GREEN, 658.9236,-570.2186,16.3359, 20, 0, 0);
  248.     Create3DTextLabel("/abastecer", COLOR_GREEN, 659.1113,-559.4594,16.3359, 20, 0, 0);
  249.     Create3DTextLabel("/abastecer", COLOR_GREEN, 652.0743,-559.9952,16.3359, 20, 0, 0);
  250.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1327.5271,2683.0139,50.0625, 20, 0, 0);
  251.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1327.9219,2677.5537,50.0625, 20, 0, 0);
  252.     Create3DTextLabel("/abastecer", COLOR_GREEN, -1328.7938,2672.1316,50.0625, 20, 0, 0);
  253.     //=============================
  254.     CreatePickup(1272, 0, 2185.4976,1021.1578,10.8203, 0);
  255.     CreatePickup(1272, 0, -2655.5527,1393.5116,7.0938, 0);
  256.     CreatePickup(1272, 0, 542.9576,-1293.9307,17.2422, 0);
  257.     CreatePickup(1274, 0, 2115.0681,1423.4795,10.8203, 0);
  258.     CreatePickup(1272, 0, 555.7392,-1293.5319,17.2482, 0);
  259.     CreatePickup(1272, 0, 531.0724,-1293.5546,17.2422, 0);
  260.     CreatePickup(1272, 0, 2182.7561,1027.8881,10.8203, 0);
  261.     CreatePickup(1272, 0, 2187.8994,1014.3012,10.8203, 0);
  262.     CreatePickup(1272, 0, -2661.3140,1391.8323,7.0994, 0);
  263.     CreatePickup(1272, 0, -2649.5305,1394.9143,7.0938, 0);
  264.     //==========Objetos============
  265.     return 1;
  266. }
  267. public clima()
  268. {
  269.     new time = random(21);
  270.     SetWeather(time);
  271. }
  272. public carregarradar()
  273. {
  274.     for(new i = 0; i < 1000; i++)
  275.     {
  276.         new str[128];
  277.         format(str, sizeof(str), "Radar/%i.ini", i);
  278.         Speed[i] = DOF2_GetInt(str, "Velocidade");
  279.         rotation[i] = DOF2_GetFloat(str, "Angulo");
  280.         rposx[i] = DOF2_GetFloat(str, "x");
  281.         rposy[i] = DOF2_GetFloat(str, "y");
  282.         rposz[i] = DOF2_GetFloat(str, "z");
  283.         rposz[i] -= 0.5;
  284.         objetoradar[i] = F_CreateObject(1270, rposx[i], rposy[i], rposz[i], 0.0, 0.0, rotation[i], 250);
  285.         new str2[128];
  286.         format(str2, sizeof(str2), "{FF230A}RADAR:\n{1CD622}Velocidade Maxima: {EDED26}%i", Speed[i]);
  287.         labelradar[i] = Create3DTextLabel(str2, COLOR_GREY, rposx[i], rposy[i], rposz[i], 80.0, 0, 0);
  288.         printf("Radar numero %i criado", i);
  289.     }
  290. }
  291. public checkradar(playerid)
  292. {
  293.     for(new i = 0; i < 1000; i++)
  294.     {
  295.         if(IsPlayerInRangeOfPoint(playerid, 15.0, rposx[i], rposy[i], rposz[i]))
  296.         {
  297.             if(jmulta[playerid] == false)
  298.             {
  299.                 if(GetPlayerSpeed(playerid) > Speed[i])
  300.                 {
  301.                     jmulta[playerid] = true;
  302.                     SetTimerEx("reset", 10000, false, "i", playerid);
  303.                     TextDrawShowForPlayer(playerid, Textdraw7);
  304.                     SetTimerEx("flash", 1000, false, "i", playerid);
  305.                     new str[128];
  306.                     format(str, sizeof(str), "{FF230A}Você foi multado em {1CD622}300R$ {FF230A}por passar a {EDED26}%iKM/h {FF230A}em um radar de {EDED26}%iKM/h",GetPlayerSpeed(playerid), Speed[i]);
  307.                     GivePlayerMoney(playerid, -300);
  308.                     SendClientMessage(playerid, COLOR_GREY, str);
  309.                     GameTextForPlayer(playerid, "~n~~n~~r~Voce foi multado", 3000, 3);
  310.                 }
  311.             }
  312.         }
  313.     }
  314. }
  315. public flash(playerid)
  316. {
  317.     TextDrawHideForPlayer(playerid, Textdraw7);
  318. }
  319. public reset(playerid)
  320. {
  321.     jmulta[playerid] = false;
  322. }
  323. public OnPlayerUpdate(playerid)
  324. {
  325.     checkradar(playerid);
  326.     return 1;
  327. }
  328. public OnPlayerConnect(playerid)
  329. {
  330.     PlayAudioStreamForPlayer(playerid, MUSICA_INICIO, 0);
  331.     GameTextForPlayer(playerid, "~n~~n~~r~Carregando", 3000, 3);
  332.     SetTimerEx("logando", TEMPO_INICIO, false, "i", playerid);
  333.     return 1;
  334. }
  335. public abastecendo(playerid)
  336. {
  337.     TogglePlayerControllable(playerid, 1);
  338.     GivePlayerMoney(playerid, -500);
  339.     SendClientMessage(playerid, COLOR_GREEN, "Voce pagou 500R$");
  340.     new carid;
  341.     carid = GetPlayerVehicleID(playerid);
  342.     new str[10];
  343.     format(str, sizeof(str), "%d", cargasolina[carid]);
  344.     TextDrawSetString(Textdraw6, str);
  345. }
  346. public posto(playerid)
  347. {
  348.     if(IsPlayerConnected(playerid))
  349.     {
  350.         if(IsPlayerInRangeOfPoint(playerid,2.0, 1939.2181,-1773.0911,13.3828))
  351.         {
  352.             return 1;
  353.         }
  354.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 1943.7041,-1772.8866,13.3906))
  355.         {
  356.             return 1;
  357.         }
  358.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 1004.1920,-939.5379,42.1797))
  359.         {
  360.             return 1;
  361.         }
  362.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 1003.5308,-934.4844,42.1797))
  363.         {
  364.             return 1;
  365.         }
  366.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -88.8889,-1163.6538,2.2602))
  367.         {
  368.             return 1;
  369.         }
  370.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -93.8022,-1175.0951,2.2660))
  371.         {
  372.             return 1;
  373.         }
  374.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1609.3066,-2718.4380,48.5391))
  375.         {
  376.             return 1;
  377.         }
  378.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1605.6553,-2714.4573,48.5335))
  379.         {
  380.             return 1;
  381.         }
  382.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1602.1990,-2710.1804,48.5391))
  383.         {
  384.             return 1;
  385.         }
  386.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1668.7905,420.3757,7.1797))
  387.         {
  388.             return 1;
  389.         }
  390.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1673.3673,415.6530,7.1797))
  391.         {
  392.             return 1;
  393.         }
  394.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1678.7944,410.2278,7.1797))
  395.         {
  396.             return 1;
  397.         }
  398.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1682.7505,406.1461,7.1797))
  399.         {
  400.             return 1;
  401.         }
  402.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 2120.8606,918.2867,10.8203))
  403.         {
  404.             return 1;
  405.         }
  406.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 2114.6873,918.4413,10.8203))
  407.         {
  408.             return 1;
  409.         }
  410.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 2108.9775,918.8206,10.8203))
  411.         {
  412.             return 1;
  413.         }
  414.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 2108.8982,928.8802,10.8203))
  415.         {
  416.             return 1;
  417.         }
  418.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 2114.6130,928.6480,10.8203))
  419.         {
  420.             return 1;
  421.         }
  422.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 2120.6721,928.8079,10.8203))
  423.         {
  424.             return 1;
  425.         }
  426.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 605.3086,1704.7125,6.9922))
  427.         {
  428.             return 1;
  429.         }
  430.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 608.1713,1700.2024,6.9922))
  431.         {
  432.             return 1;
  433.         }
  434.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 611.9305,1694.8732,6.9922))
  435.         {
  436.             return 1;
  437.         }
  438.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 615.1508,1689.9467,6.9922))
  439.         {
  440.             return 1;
  441.         }
  442.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 618.6849,1684.9962,6.9922))
  443.         {
  444.             return 1;
  445.         }
  446.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 622.2836,1679.7192,6.9922))
  447.         {
  448.             return 1;
  449.         }
  450.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 652.6727,-570.3786,16.3359))
  451.         {
  452.             return 1;
  453.         }
  454.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 658.9236,-570.2186,16.3359))
  455.         {
  456.             return 1;
  457.         }
  458.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 659.1113,-559.4594,16.3359))
  459.         {
  460.             return 1;
  461.         }
  462.         else if(IsPlayerInRangeOfPoint(playerid,2.0, 652.0743,-559.9952,16.3359))
  463.         {
  464.             return 1;
  465.         }
  466.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1327.5271,2683.0139,50.0625))
  467.         {
  468.             return 1;
  469.         }
  470.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1327.9219,2677.5537,50.0625))
  471.         {
  472.             return 1;
  473.         }
  474.         else if(IsPlayerInRangeOfPoint(playerid,2.0, -1328.7938,2672.1316,50.0625))
  475.         {
  476.             return 1;
  477.         }
  478.     }
  479.     return 0;
  480. }
  481. public velocidade(playerid)
  482. {
  483.     new str[10];
  484.     format(str, sizeof(str), "%d", GetPlayerSpeed(playerid));
  485.     TextDrawSetString(Textdraw4, str);
  486.     new carid;
  487.     carid = GetPlayerVehicleID(playerid);
  488.     if(cargasolina[carid] == 0)
  489.     {
  490.         TextDrawSetString(Textdraw6, str);
  491.         SetVehicleParamsEx(carid, 0, 0, 0, 0, 0, 0, 0);
  492.     }
  493.     else
  494.     {
  495.         SetVehicleParamsEx(carid, 1, 0, 0, 0, 0, 0, 0);
  496.     }
  497. }
  498. public gasolina(playerid)
  499. {
  500.     new carid;
  501.     carid = GetPlayerVehicleID(playerid);
  502.     new str[10];
  503.     format(str, sizeof(str), "%d", cargasolina[carid]);
  504.     if(cargasolina[carid] >= 1)
  505.     {
  506.         cargasolina[carid] -= 1;
  507.         TextDrawSetString(Textdraw6, str);
  508.     }
  509.     else
  510.     {
  511.         SendClientMessage(playerid, COLOR_YELLOW, "Veiculo sem combustivel!!!");
  512.     }
  513. }
  514. public OnPlayerStateChange(playerid, newstate, oldstate)
  515. {
  516.     if(newstate == PLAYER_STATE_DRIVER)
  517.     {
  518.         maxtimer[0] = SetTimerEx("velocidade", A_VELOCIMETRO, true, "i", playerid);
  519.         maxtimer[1] = SetTimerEx("gasolina", GASTO_GASOLINA, true, "i", playerid);
  520.         new str[10], carid;
  521.         carid = GetPlayerVehicleID(playerid);
  522.         format(str, sizeof(str), "%d", cargasolina[carid]);
  523.         TextDrawSetString(Textdraw6, str);
  524.         TextDrawShowForPlayer(playerid, Textdraw2);
  525.         TextDrawShowForPlayer(playerid, Textdraw3);
  526.         TextDrawShowForPlayer(playerid, Textdraw4);
  527.         TextDrawShowForPlayer(playerid, Textdraw5);
  528.         TextDrawShowForPlayer(playerid, Textdraw6);
  529.     }
  530.     else if(oldstate == PLAYER_STATE_DRIVER)
  531.     {
  532.         KillTimer(maxtimer[0]);
  533.         KillTimer(maxtimer[1]);
  534.         TextDrawHideForPlayer(playerid, Textdraw2);
  535.         TextDrawHideForPlayer(playerid, Textdraw3);
  536.         TextDrawHideForPlayer(playerid, Textdraw4);
  537.         TextDrawHideForPlayer(playerid, Textdraw5);
  538.         TextDrawHideForPlayer(playerid, Textdraw6);
  539.     }
  540.     return 1;
  541. }
  542.  
  543. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  544. {
  545.     if(dialogid == DIALOG_REGISTER)
  546.     {
  547.         new str[128];
  548.         new nick[MAX_PLAYER_NAME];
  549.         new senha;
  550.         senha = strval(inputtext);
  551.         GetPlayerName(playerid, nick, sizeof(nick));
  552.         format(str, sizeof(str),"Contas/%s.ini",nick);
  553.         DOF2_CreateFile(str);
  554.         DOF2_SetInt(str, "SENHA", senha);
  555.         DOF2_SaveFile();
  556.         new csenha;
  557.         csenha = DOF2_GetInt(str, "SENHA");
  558.         if(response)
  559.         {
  560.             if(csenha == 0)
  561.             {
  562.                 ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF230A}Registro", "{0597F2}Por favor digite sua {1CD622}SENHA apenas NUMEROS.", "Registrar", "Sair");
  563.             }
  564.             else
  565.             {
  566.                 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF230A}Login", "{0597F2}Por favor digite sua {1CD622}SENHA.", "Logar", "Sair");
  567.                 GivePlayerMoney(playerid, DINHEIRO_INICIAL);
  568.                 SetPlayerScore(playerid, SCORE_INICIAL);
  569.                 DOF2_SetInt(str, "NUMEROCARRO", 0);
  570.                 DOF2_SaveFile();
  571.             }
  572.         }
  573.         else
  574.         {
  575.         Kick(playerid);
  576.         }
  577.        
  578.     }
  579.     if(dialogid == DIALOG_CONCE)
  580.     {
  581.         if(response)
  582.         {
  583.             if(listitem == 0)
  584.             {
  585.                 new concegrana;
  586.                 concegrana = GetPlayerMoney(playerid);
  587.                 if(concegrana >= 25000)
  588.                 {
  589.                     SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  590.                 }
  591.                 else
  592.                 {
  593.                     GameTextForPlayer(playerid, "~n~~n~~r~Voce nao tem dinheiro o bastante para nenhum caminhao!!!", 5000, 3);
  594.                 }
  595.             }
  596.             if(listitem == 1)
  597.             {
  598.                 ShowPlayerDialog(playerid, DIALOG_CONCEVENDA, DIALOG_STYLE_LIST, "{FF230A}Venda", "{1CD622}Veiculo 1\n{0597F2}Veiculo 2", "Vender", "Sair");
  599.             }
  600.         }
  601.     }
  602.     if(dialogid == DIALOG_CONCEVENDA)
  603.     {
  604.         if(response)
  605.         {
  606.             if(listitem == 0)
  607.             {
  608.                 new str[128];
  609.                 new nome[MAX_PLAYER_NAME];
  610.                 GetPlayerName(playerid, nome, sizeof(nome));
  611.                 format(str, sizeof(str), "Contas/%s.ini", nome);
  612.                 new cveiculo;
  613.                 cveiculo = DOF2_GetInt(str, "MODELO1");
  614.                 new ncarro;
  615.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  616.                 if(ncarro >= 1)
  617.                 {
  618.                     if(cveiculo == 414)
  619.                     {
  620.                         GivePlayerMoney(playerid, 25000);
  621.                         ncarro -= 1;
  622.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  623.                         DOF2_SaveFile();
  624.                         DOF2_SetInt(str, "MODELO1", 0);
  625.                         DOF2_SaveFile();
  626.                     }
  627.                     else if(cveiculo == 456)
  628.                     {
  629.                         GivePlayerMoney(playerid, 30000);
  630.                         ncarro -= 1;
  631.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  632.                         DOF2_SaveFile();
  633.                         DOF2_SetInt(str, "MODELO1", 0);
  634.                         DOF2_SaveFile();
  635.                     }
  636.                     else if(cveiculo == 499)
  637.                     {
  638.                         GivePlayerMoney(playerid, 15000);
  639.                         ncarro -= 1;
  640.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  641.                         DOF2_SaveFile();
  642.                         DOF2_SetInt(str, "MODELO1", 0);
  643.                         DOF2_SaveFile();
  644.                     }
  645.                     else if(cveiculo == 578)
  646.                     {
  647.                         GivePlayerMoney(playerid, 50000);
  648.                         ncarro -= 1;
  649.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  650.                         DOF2_SaveFile();
  651.                         DOF2_SetInt(str, "MODELO1", 0);
  652.                         DOF2_SaveFile();
  653.                     }
  654.                     else if(cveiculo == 403)
  655.                     {
  656.                         GivePlayerMoney(playerid, 80000);
  657.                         ncarro -= 1;
  658.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  659.                         DOF2_SaveFile();
  660.                         DOF2_SetInt(str, "MODELO1", 0);
  661.                         DOF2_SaveFile();
  662.                     }
  663.                     else if(cveiculo == 514)
  664.                     {
  665.                         GivePlayerMoney(playerid, 100000);
  666.                         ncarro -= 1;
  667.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  668.                         DOF2_SaveFile();
  669.                         DOF2_SetInt(str, "MODELO1", 0);
  670.                         DOF2_SaveFile();
  671.                     }  
  672.                 }
  673.                 else
  674.                 {
  675.                     GameTextForPlayer(playerid, "~n~~n~~r~Nenhum veiculo", 3000, 3);
  676.                 }
  677.             }
  678.             if(listitem == 1)
  679.             {
  680.                 new str[128];
  681.                 new nome[MAX_PLAYER_NAME];
  682.                 GetPlayerName(playerid, nome, sizeof(nome));
  683.                 format(str, sizeof(str), "Contas/%s.ini", nome);
  684.                 new cveiculo;
  685.                 cveiculo = DOF2_GetInt(str, "MODELO2");
  686.                 new ncarro;
  687.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  688.                 if(ncarro >= 1)
  689.                 {
  690.                     if(cveiculo == 414)
  691.                     {
  692.                         GivePlayerMoney(playerid, 25000);
  693.                         ncarro -= 1;
  694.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  695.                         DOF2_SaveFile();
  696.                         DOF2_SetInt(str, "MODELO2", 0);
  697.                         DOF2_SaveFile();
  698.                     }
  699.                     else if(cveiculo == 456)
  700.                     {
  701.                         GivePlayerMoney(playerid, 30000);
  702.                         ncarro -= 1;
  703.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  704.                         DOF2_SaveFile();
  705.                         DOF2_SetInt(str, "MODELO2", 0);
  706.                         DOF2_SaveFile();
  707.                     }
  708.                     else if(cveiculo == 499)
  709.                     {
  710.                         GivePlayerMoney(playerid, 15000);
  711.                         ncarro -= 1;
  712.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  713.                         DOF2_SaveFile();
  714.                         DOF2_SetInt(str, "MODELO2", 0);
  715.                         DOF2_SaveFile();
  716.                     }
  717.                     else if(cveiculo == 578)
  718.                     {
  719.                         GivePlayerMoney(playerid, 50000);
  720.                         ncarro -= 1;
  721.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  722.                         DOF2_SaveFile();
  723.                         DOF2_SetInt(str, "MODELO2", 0);
  724.                         DOF2_SaveFile();
  725.                     }
  726.                     else if(cveiculo == 403)
  727.                     {
  728.                         GivePlayerMoney(playerid, 80000);
  729.                         ncarro -= 1;
  730.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  731.                         DOF2_SaveFile();
  732.                         DOF2_SetInt(str, "MODELO2", 0);
  733.                         DOF2_SaveFile();
  734.                     }
  735.                     else if(cveiculo == 514)
  736.                     {
  737.                         GivePlayerMoney(playerid, 100000);
  738.                         ncarro -= 1;
  739.                         DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  740.                         DOF2_SaveFile();
  741.                         DOF2_SetInt(str, "MODELO2", 0);
  742.                         DOF2_SaveFile();
  743.                     }  
  744.                 }
  745.                 else
  746.                 {
  747.                     GameTextForPlayer(playerid, "~n~~n~~r~Nenhum veiculo", 3000, 3);
  748.                 }
  749.             }
  750.         }
  751.     }
  752.     if(dialogid == DIALOG_LOGIN)
  753.     {
  754.         new nome[MAX_PLAYER_NAME];
  755.         GetPlayerName(playerid, nome, sizeof(nome));
  756.         new str[128];
  757.         format(str, sizeof(str),"Contas/%s.ini", nome);
  758.         new senha1;
  759.         new senha2;
  760.         senha1 = DOF2_GetInt(str, "SENHA");
  761.         senha2 = strval(inputtext);
  762.         if(response)
  763.         {
  764.             if(senha1 == senha2)
  765.             {
  766.                 new dinheiro;
  767.                 dinheiro = DOF2_GetInt(str,"DINHEIRO");
  768.                 GivePlayerMoney(playerid, dinheiro);
  769.                 SetSpawnInfo(playerid, 0, 0, -1991.7028,137.0670,27.5391,0, 0, 0, 0, 0, 0, 0);
  770.                 SpawnPlayer(playerid);
  771.                 SetPlayerPos(playerid, 1402.4291, -806.8134, 85.0475);
  772.                 SetPlayerCameraPos(playerid, 1365.7329,-900.0773,36.1101);
  773.                 SetPlayerCameraLookAt(playerid, 1378.1764,-869.2653,48.2478);
  774.                 SendClientMessage(playerid, COLOR_RED, "");
  775.                 SendClientMessage(playerid, COLOR_RED, "");
  776.                 SendClientMessage(playerid, COLOR_RED, "");
  777.                 SendClientMessage(playerid, COLOR_RED, "");
  778.                 SendClientMessage(playerid, COLOR_RED, "");
  779.                 SendClientMessage(playerid, COLOR_RED, "");
  780.                 SendClientMessage(playerid, COLOR_RED, "");
  781.                 SendClientMessage(playerid, COLOR_RED, "");
  782.                 SendClientMessage(playerid, COLOR_RED, "");
  783.                 SendClientMessage(playerid, COLOR_RED, "");
  784.                 SendClientMessage(playerid, COLOR_RED, "");
  785.                 SendClientMessage(playerid, COLOR_RED, "");
  786.                 SendClientMessage(playerid, COLOR_RED, "Você logou com suscesso!");
  787.                 new primeira;
  788.                 primeira = DOF2_GetInt(str, "VISITA");
  789.                 if(primeira == 0)
  790.                 {
  791.                     ShowPlayerDialog(playerid, DIALOG_INFO1, DIALOG_STYLE_MSGBOX, "\t{FF230A}Bem Vindo", "{FAAC02}Ol , seja bem vindo ao nosso servidor,\n{0597F2}Para iniciar vamos levar voce a {EDED26}CONCESSIONARIA.", "{1CD622}Ir", "");
  792.                 }
  793.                 else
  794.                 {
  795.                     ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  796.                     new stradm[128];
  797.                     new nomeadm[MAX_PLAYER_NAME];
  798.                     GetPlayerName(playerid, nomeadm, sizeof(nomeadm));
  799.                     format(stradm, sizeof(stradm), "Contas/%s.ini", nomeadm);
  800.                     new A;
  801.                     A = DOF2_GetInt(str, "ADMIN");
  802.                     if(A >= 1)
  803.                     {
  804.                         padmin[playerid] = A;
  805.                     }
  806.                 }
  807.             }
  808.             else
  809.             {
  810.                 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF230A}Login", "{0597F2}Por favor digite sua {1CD622}SENHA.", "Logar", "Sair");
  811.             }
  812.         }
  813.         else
  814.         {
  815.         Kick(playerid);
  816.         }
  817.     }
  818.     if(dialogid == DIALOG_SPAWN)
  819.     {
  820.         if(response)
  821.         {
  822.                 if(listitem == 0)
  823.                 {
  824.                     SetPlayerPos(playerid, 566.3535,-1284.1359,17.2482);
  825.                     SetCameraBehindPlayer(playerid);
  826.                     TogglePlayerControllable(playerid, 1);
  827.                     GameTextForPlayer(playerid, "~n~~n~~R~Bem ~b~Vindo ~g~a~n~~p~LOS SANTOS", 3000, 3);
  828.                     StopAudioStreamForPlayer(playerid);
  829.                 }
  830.                 if(listitem == 1)
  831.                 {
  832.                     SetPlayerPos(playerid, 2177.3284,1038.6556,10.8203);
  833.                     SetCameraBehindPlayer(playerid);
  834.                     TogglePlayerControllable(playerid, 1);
  835.                     GameTextForPlayer(playerid, "~n~~n~~R~Bem ~b~Vindo ~g~a~n~~p~LAS VENTURAS", 3000, 3);
  836.                     StopAudioStreamForPlayer(playerid);
  837.                 }
  838.                 if(listitem == 2)
  839.                 {
  840.                     SetPlayerPos(playerid, -2635.5271,1398.8340,7.0938);
  841.                     SetCameraBehindPlayer(playerid);
  842.                     TogglePlayerControllable(playerid, 1);
  843.                     GameTextForPlayer(playerid, "~n~~n~~R~Bem ~b~Vindo ~g~a~n~~p~SAN FIERRO", 3000, 3);
  844.                     StopAudioStreamForPlayer(playerid);
  845.                 }
  846.         }
  847.         else
  848.         {
  849.             ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  850.         }
  851.     }
  852.     if(dialogid == DIALOG_INFO1)
  853.     {
  854.         if(response)
  855.         {
  856.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  857.         }
  858.         else
  859.         {
  860.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  861.         }
  862.     }
  863.     if(dialogid == DIALOG_MULE)
  864.     {
  865.         if(response)
  866.         {
  867.             new grana;
  868.             grana = GetPlayerMoney(playerid);
  869.             if(grana >= PRECO_MULE)
  870.             {
  871.                 ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  872.                 new str[128];
  873.                 new nome[MAX_PLAYER_NAME];
  874.                 GetPlayerName(playerid, nome, sizeof(nome));
  875.                 format(str, sizeof(str),"Contas/%s.ini", nome);
  876.                 new ncarro;
  877.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  878.                 ncarro += 1;
  879.                 DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  880.                 DOF2_SaveFile();
  881.                 GivePlayerMoney(playerid, -PRECO_MULE);
  882.                 DOF2_SetInt(str ,"VISITA", 1);
  883.                 DOF2_SaveFile();
  884.                 if(ncarro == 1)
  885.                 {
  886.                     DOF2_SetInt(str, "MODELO1", 414);
  887.                     DOF2_SaveFile();
  888.                     TextDrawHideForPlayer(playerid, Textdraw0);
  889.                     TextDrawHideForPlayer(playerid, Textdraw1);
  890.                 }
  891.                 else if(ncarro == 2)
  892.                 {
  893.                     DOF2_SetInt(str, "MODELO2", 414);
  894.                     DOF2_SaveFile();
  895.                     TextDrawHideForPlayer(playerid, Textdraw0);
  896.                     TextDrawHideForPlayer(playerid, Textdraw1);
  897.                 }
  898.                 else{}
  899.             }
  900.             else
  901.             {
  902.                 SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  903.             }
  904.         }
  905.         else
  906.         {
  907.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  908.             if(veiculo[playerid] == 5)
  909.             {
  910.             veiculo[playerid] = 0;
  911.             }
  912.             else
  913.             veiculo[playerid] += 1;
  914.         }
  915.     }
  916.     if(dialogid == DIALOG_YANKEE)
  917.     {
  918.         if(response)
  919.         {
  920.             new grana;
  921.             grana = GetPlayerMoney(playerid);
  922.             if(grana >= PRECO_YANKEE)
  923.             {
  924.                 ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  925.                 new str[128];
  926.                 new nome[MAX_PLAYER_NAME];
  927.                 GetPlayerName(playerid, nome, sizeof(nome));
  928.                 format(str, sizeof(str),"Contas/%s.ini", nome);
  929.                 new ncarro;
  930.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  931.                 ncarro += 1;
  932.                 DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  933.                 DOF2_SaveFile();
  934.                 GivePlayerMoney(playerid, -PRECO_YANKEE);
  935.                 DOF2_SetInt(str ,"VISITA", 1);
  936.                 DOF2_SaveFile();
  937.                 if(ncarro == 1)
  938.                 {
  939.                     DOF2_SetInt(str, "MODELO1", 456);
  940.                     DOF2_SaveFile();
  941.                     TextDrawHideForPlayer(playerid, Textdraw0);
  942.                     TextDrawHideForPlayer(playerid, Textdraw1);
  943.                 }
  944.                 else if(ncarro == 2)
  945.                 {
  946.                     DOF2_SetInt(str, "MODELO2", 456);
  947.                     DOF2_SaveFile();
  948.                     TextDrawHideForPlayer(playerid, Textdraw0);
  949.                     TextDrawHideForPlayer(playerid, Textdraw1);
  950.                 }
  951.                 else{}
  952.             }
  953.             else
  954.             {
  955.                 SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  956.             }
  957.         }
  958.         else
  959.         {
  960.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  961.             if(veiculo[playerid] == 5)
  962.             {
  963.             veiculo[playerid] = 0;
  964.             }
  965.             else
  966.             veiculo[playerid] += 1;
  967.         }
  968.     }
  969.     if(dialogid == DIALOG_BENSON)
  970.     {
  971.         if(response)
  972.         {
  973.             new grana;
  974.             grana = GetPlayerMoney(playerid);
  975.             if(grana >= PRECO_BENSON)
  976.             {
  977.                 ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  978.                 new str[128];
  979.                 new nome[MAX_PLAYER_NAME];
  980.                 GetPlayerName(playerid, nome, sizeof(nome));
  981.                 format(str, sizeof(str),"Contas/%s.ini", nome);
  982.                 new ncarro;
  983.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  984.                 ncarro += 1;
  985.                 DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  986.                 DOF2_SaveFile();
  987.                 GivePlayerMoney(playerid, -PRECO_BENSON);
  988.                 DOF2_SetInt(str ,"VISITA", 1);
  989.                 DOF2_SaveFile();
  990.                 if(ncarro == 1)
  991.                 {
  992.                     DOF2_SetInt(str, "MODELO1", 499);
  993.                     DOF2_SaveFile();
  994.                     TextDrawHideForPlayer(playerid, Textdraw0);
  995.                     TextDrawHideForPlayer(playerid, Textdraw1);
  996.                 }
  997.                 else if(ncarro == 2)
  998.                 {
  999.                     DOF2_SetInt(str, "MODELO2", 499);
  1000.                     DOF2_SaveFile();
  1001.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1002.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1003.                 }
  1004.                 else{}
  1005.             }
  1006.             else
  1007.             {
  1008.                 SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1009.             }
  1010.         }
  1011.         else
  1012.         {
  1013.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1014.             if(veiculo[playerid] == 5)
  1015.             {
  1016.             veiculo[playerid] = 0;
  1017.             }
  1018.             else
  1019.             veiculo[playerid] += 1;
  1020.         }
  1021.     }
  1022.     if(dialogid == DIALOG_DFT30)
  1023.     {
  1024.         if(response)
  1025.         {
  1026.             new grana;
  1027.             grana = GetPlayerMoney(playerid);
  1028.             if(grana >= PRECO_DFT30)
  1029.             {
  1030.                 ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  1031.                 new str[128];
  1032.                 new nome[MAX_PLAYER_NAME];
  1033.                 GetPlayerName(playerid, nome, sizeof(nome));
  1034.                 format(str, sizeof(str),"Contas/%s.ini", nome);
  1035.                 new ncarro;
  1036.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  1037.                 ncarro += 1;
  1038.                 DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  1039.                 DOF2_SaveFile();
  1040.                 GivePlayerMoney(playerid, -PRECO_DFT30);
  1041.                 DOF2_SetInt(str ,"VISITA", 1);
  1042.                 DOF2_SaveFile();
  1043.                 if(ncarro == 1)
  1044.                 {
  1045.                     DOF2_SetInt(str, "MODELO1", 578);
  1046.                     DOF2_SaveFile();
  1047.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1048.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1049.                 }
  1050.                 else if(ncarro == 2)
  1051.                 {
  1052.                     DOF2_SetInt(str, "MODELO2", 578);
  1053.                     DOF2_SaveFile();
  1054.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1055.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1056.                 }
  1057.                 else{}
  1058.             }
  1059.             else
  1060.             {
  1061.                 SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1062.             }
  1063.         }
  1064.         else
  1065.         {
  1066.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1067.             if(veiculo[playerid] == 5)
  1068.             {
  1069.             veiculo[playerid] = 0;
  1070.             }
  1071.             else
  1072.             veiculo[playerid] += 1;
  1073.         }
  1074.     }
  1075.     if(dialogid == DIALOG_LINERUNNER)
  1076.     {
  1077.         if(response)
  1078.         {
  1079.             new grana;
  1080.             grana = GetPlayerMoney(playerid);
  1081.             if(grana >= PRECO_LINERUNNER)
  1082.             {
  1083.                 ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  1084.                 new str[128];
  1085.                 new nome[MAX_PLAYER_NAME];
  1086.                 GetPlayerName(playerid, nome, sizeof(nome));
  1087.                 format(str, sizeof(str),"Contas/%s.ini", nome);
  1088.                 new ncarro;
  1089.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  1090.                 ncarro += 1;
  1091.                 DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  1092.                 DOF2_SaveFile();
  1093.                 GivePlayerMoney(playerid, -PRECO_LINERUNNER);
  1094.                 DOF2_SetInt(str ,"VISITA", 1);
  1095.                 DOF2_SaveFile();
  1096.                 if(ncarro == 1)
  1097.                 {
  1098.                     DOF2_SetInt(str, "MODELO1", 403);
  1099.                     DOF2_SaveFile();
  1100.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1101.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1102.                 }
  1103.                 else if(ncarro == 2)
  1104.                 {
  1105.                     DOF2_SetInt(str, "MODELO2", 403);
  1106.                     DOF2_SaveFile();
  1107.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1108.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1109.                 }
  1110.                 else{}
  1111.             }
  1112.             else
  1113.             {
  1114.                 SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1115.             }
  1116.         }
  1117.         else
  1118.         {
  1119.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1120.             if(veiculo[playerid] == 5)
  1121.             {
  1122.             veiculo[playerid] = 0;
  1123.             }
  1124.             else
  1125.             veiculo[playerid] += 1;
  1126.         }
  1127.     }
  1128.     if(dialogid == DIALOG_TANKER)
  1129.     {
  1130.         if(response)
  1131.         {
  1132.             new grana;
  1133.             grana = GetPlayerMoney(playerid);
  1134.             if(grana >= PRECO_TANKER)
  1135.             {
  1136.                 ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  1137.                 new str[128];
  1138.                 new nome[MAX_PLAYER_NAME];
  1139.                 GetPlayerName(playerid, nome, sizeof(nome));
  1140.                 format(str, sizeof(str),"Contas/%s.ini", nome);
  1141.                 new ncarro;
  1142.                 ncarro = DOF2_GetInt(str, "NUMEROCARRO");
  1143.                 ncarro += 1;
  1144.                 DOF2_SetInt(str, "NUMEROCARRO", ncarro);
  1145.                 DOF2_SaveFile();
  1146.                 GivePlayerMoney(playerid, -PRECO_TANKER);
  1147.                 DOF2_SetInt(str ,"VISITA", 1);
  1148.                 DOF2_SaveFile();
  1149.                 if(ncarro == 1)
  1150.                 {
  1151.                     DOF2_SetInt(str, "MODELO1", 514);
  1152.                     DOF2_SaveFile();
  1153.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1154.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1155.                 }
  1156.                 else if(ncarro == 2)
  1157.                 {
  1158.                     DOF2_SetInt(str, "MODELO2", 514);
  1159.                     DOF2_SaveFile();
  1160.                     TextDrawHideForPlayer(playerid, Textdraw0);
  1161.                     TextDrawHideForPlayer(playerid, Textdraw1);
  1162.                 }
  1163.                 else{}
  1164.             }
  1165.             else
  1166.             {
  1167.                 SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1168.             }
  1169.         }
  1170.         else
  1171.         {
  1172.             SetTimerEx("comprandocaminhao", 500, false, "i", playerid);
  1173.             if(veiculo[playerid] == 5)
  1174.             {
  1175.             veiculo[playerid] = 0;
  1176.             }
  1177.             else
  1178.             veiculo[playerid] += 1;
  1179.         }
  1180.     }
  1181.     if(dialogid == DIALOG_GARAGE1LS)
  1182.     {
  1183.         if(response)
  1184.         {
  1185.             new str[128];
  1186.             new nome[MAX_PLAYER_NAME];
  1187.             GetPlayerName(playerid, nome, sizeof(nome));
  1188.             new mcarro;
  1189.             format(str, sizeof(str),"Contas/%s.ini", nome);
  1190.             mcarro = DOF2_GetInt(str, "MODELO1");
  1191.             vuso[playerid] = CreateVehicle(mcarro, 542.7371, -1277.3978, 17.2422, 302.0327, 1, 1, 0);
  1192.             GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
  1193.         }
  1194.     }
  1195.     if(dialogid == DIALOG_GARAGE2LS)
  1196.     {
  1197.         if(response)
  1198.         {
  1199.             new str[128];
  1200.             new nome[MAX_PLAYER_NAME];
  1201.             GetPlayerName(playerid, nome, sizeof(nome));
  1202.             new mcarro;
  1203.             format(str, sizeof(str),"Contas/%s.ini", nome);
  1204.             mcarro = DOF2_GetInt(str, "MODELO2");
  1205.             vuso[playerid] = CreateVehicle(mcarro, 542.7371, -1277.3978, 17.2422, 302.0327, 1, 1, 0);
  1206.             GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
  1207.         }
  1208.     }
  1209.     if(dialogid == DIALOG_GARAGE1LV)
  1210.     {
  1211.         if(response)
  1212.         {
  1213.             new str[128];
  1214.             new nome[MAX_PLAYER_NAME];
  1215.             GetPlayerName(playerid, nome, sizeof(nome));
  1216.             new mcarro;
  1217.             format(str, sizeof(str),"Contas/%s.ini", nome);
  1218.             mcarro = DOF2_GetInt(str, "MODELO1");
  1219.             vuso[playerid] = CreateVehicle(mcarro, 2172.6853,1013.5220,10.8203,180.5532, 1, 1, 0);
  1220.             GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
  1221.         }
  1222.     }
  1223.     if(dialogid == DIALOG_GARAGE2LV)
  1224.     {
  1225.         if(response)
  1226.         {
  1227.             new str[128];
  1228.             new nome[MAX_PLAYER_NAME];
  1229.             GetPlayerName(playerid, nome, sizeof(nome));
  1230.             new mcarro;
  1231.             format(str, sizeof(str),"Contas/%s.ini", nome);
  1232.             mcarro = DOF2_GetInt(str, "MODELO2");
  1233.             vuso[playerid] = CreateVehicle(mcarro, 2172.6853,1013.5220,10.8203,180.5532, 1, 1, 0);
  1234.             GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
  1235.         }
  1236.     }
  1237.     if(dialogid == DIALOG_GARAGE1SF)
  1238.     {
  1239.         if(response)
  1240.         {
  1241.             new str[128];
  1242.             new nome[MAX_PLAYER_NAME];
  1243.             GetPlayerName(playerid, nome, sizeof(nome));
  1244.             new mcarro;
  1245.             format(str, sizeof(str),"Contas/%s.ini", nome);
  1246.             mcarro = DOF2_GetInt(str, "MODELO1");
  1247.             vuso[playerid] = CreateVehicle(mcarro, -2644.6265,1348.4856,7.1624,180.5532, 1, 1, 0);
  1248.             GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
  1249.         }
  1250.     }
  1251.     if(dialogid == DIALOG_GARAGE2SF)
  1252.     {
  1253.         if(response)
  1254.         {
  1255.             new str[128];
  1256.             new nome[MAX_PLAYER_NAME];
  1257.             GetPlayerName(playerid, nome, sizeof(nome));
  1258.             new mcarro;
  1259.             format(str, sizeof(str),"Contas/%s.ini", nome);
  1260.             mcarro = DOF2_GetInt(str, "MODELO2");
  1261.             vuso[playerid] = CreateVehicle(mcarro, -2644.6265,1348.4856,7.1624,180.5532, 1, 1, 0);
  1262.             GameTextForPlayer(playerid, "~n~~n~~b~Seu Veiculo esta no estacionamento!", 3000, 3);
  1263.         }
  1264.     }
  1265.     return 0;
  1266. }
  1267.  
  1268. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1269. {
  1270.     if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
  1271.     {
  1272.         if(IsPlayerInRangeOfPoint(playerid, 3, 2115.0681,1423.4795,10.8203))
  1273.         {
  1274.             ShowPlayerDialog(playerid, DIALOG_CONCE, DIALOG_STYLE_LIST, "{FF230A}Concessionaria", "{EDED26}Comprar\n{1CD622}Vender", "Proximo", "Sair");
  1275.         }
  1276.     }
  1277.     return 1;
  1278. }
  1279.  
  1280. public OnGameModeExit()
  1281. {
  1282.     for(new i = 0; i < 1000; i++)
  1283.     {
  1284.         cargasolina[i] = 100;
  1285.     }
  1286.     TextDrawDestroy(Textdraw0);
  1287.     TextDrawDestroy(Textdraw1);
  1288.     TextDrawDestroy(Textdraw2);
  1289.     TextDrawDestroy(Textdraw3);
  1290.     TextDrawDestroy(Textdraw4);
  1291.     TextDrawDestroy(Textdraw5);
  1292.     TextDrawDestroy(Textdraw6);
  1293.     DOF2_Exit();
  1294.     return 1;
  1295. }
  1296.  
  1297. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  1298. {
  1299.     if(padmin[playerid] >= 1)
  1300.     {
  1301.         SetPlayerPosFindZ(playerid, fX, fY, fZ);
  1302.     }
  1303.     return 1;
  1304. }
  1305.  
  1306. public OnPlayerRequestClass(playerid, classid)
  1307. {
  1308.     return 1;
  1309. }
  1310.  
  1311. public OnPlayerRequestSpawn(playerid)
  1312. {
  1313.     return 1;
  1314. }
  1315.  
  1316. public OnPlayerDisconnect(playerid, reason)
  1317. {
  1318.     new strgrana[128];
  1319.     new strscore[128];
  1320.     new nome[MAX_PLAYER_NAME];
  1321.     new dinheiro;
  1322.     new score;
  1323.     GetPlayerName(playerid, nome, sizeof(nome));
  1324.     score = GetPlayerScore(playerid);
  1325.     format(strgrana, sizeof(strgrana),"Contas/%s.ini",nome);
  1326.     format(strscore, sizeof(strscore),"Contas/%s.ini",nome);
  1327.     dinheiro = GetPlayerMoney(playerid);
  1328.     DOF2_SetInt(strgrana,"DINHEIRO", dinheiro);
  1329.     DOF2_SetInt(strscore,"SCORE", score);
  1330.     DOF2_SaveFile();
  1331.     DestroyVehicle(vuso[playerid]);
  1332.     cargasolina[vuso[playerid]] = 100;
  1333.     vuso[playerid] = 0;
  1334.     KillTimer(maxtimer[0]);
  1335.     KillTimer(maxtimer[1]);
  1336.     padmin[playerid] = 0;
  1337.     permissaoadm[playerid] = 0;
  1338.     return 1;
  1339. }
  1340.  
  1341. public OnPlayerSpawn(playerid)
  1342. {
  1343.     ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "{FF230A}Garagens", "{1CD622}Los Santos\n{EDED26}Las Venturas\n{0597F2}San Fierro", "Ir", "");
  1344.     return 1;
  1345. }
  1346.  
  1347. public comprandocaminhao(playerid)
  1348. {
  1349.     TextDrawShowForPlayer(playerid, Textdraw0);
  1350.     TextDrawShowForPlayer(playerid, Textdraw1);
  1351.     TogglePlayerControllable(playerid, 0);
  1352.     SetPlayerPos(playerid, 2153.9448,1417.2538,10.8203);
  1353.     SendClientMessage(playerid, COLOR_BLUE, "");
  1354.     SendClientMessage(playerid, COLOR_BLUE, "");
  1355.     SendClientMessage(playerid, COLOR_BLUE, "");
  1356.     SendClientMessage(playerid, COLOR_BLUE, "");
  1357.     SendClientMessage(playerid, COLOR_BLUE, "");
  1358.     SendClientMessage(playerid, COLOR_BLUE, "");
  1359.     SendClientMessage(playerid, COLOR_BLUE, "");
  1360.     SendClientMessage(playerid, COLOR_BLUE, "");
  1361.     SendClientMessage(playerid, COLOR_BLUE, "");
  1362.     SendClientMessage(playerid, COLOR_BLUE, "");
  1363.     SendClientMessage(playerid, COLOR_BLUE, "");
  1364.     if(veiculo[playerid] == 0)
  1365.     {
  1366.         format(pmule, sizeof(pmule),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_MULE);
  1367.         ShowPlayerDialog(playerid, DIALOG_MULE, DIALOG_STYLE_MSGBOX, "{FF230A}Mule", pmule, "Comprar","Proximo");
  1368.         SetPlayerCameraPos(playerid,2153.9448,1417.2538,10.8203);
  1369.         SetPlayerCameraLookAt(playerid,2150.7012,1411.8068,10.8203);
  1370.         GameTextForPlayer(playerid, "~b~Mule", 3000, 3);
  1371.     }
  1372.     if(veiculo[playerid] == 1)
  1373.     {
  1374.         format(pyankee, sizeof(pyankee),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_YANKEE);
  1375.         ShowPlayerDialog(playerid, DIALOG_YANKEE, DIALOG_STYLE_MSGBOX, "{FF230A}Yankee", pyankee, "Comprar","Proximo");
  1376.         SetPlayerCameraPos(playerid,2145.0935,1418.4807,10.8203);
  1377.         SetPlayerCameraLookAt(playerid,2140.8965,1412.4388,10.8203);
  1378.         GameTextForPlayer(playerid, "~b~Yankee", 3000, 3);
  1379.     }
  1380.     if(veiculo[playerid] == 2)
  1381.     {
  1382.         format(pbenson, sizeof(pbenson),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_BENSON);
  1383.         ShowPlayerDialog(playerid, DIALOG_BENSON, DIALOG_STYLE_MSGBOX, "{FF230A}Benson", pbenson, "Comprar","Proximo");
  1384.         SetPlayerCameraPos(playerid,2134.9573,1416.9146,10.8203);
  1385.         SetPlayerCameraLookAt(playerid,2131.0525,1411.1654,10.8203);
  1386.         GameTextForPlayer(playerid, "~b~Benson", 3000, 3);
  1387.     }
  1388.     if(veiculo[playerid] == 3)
  1389.     {
  1390.         format(pdft, sizeof(pdft),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_DFT30);
  1391.         ShowPlayerDialog(playerid, DIALOG_DFT30, DIALOG_STYLE_MSGBOX, "{FF230A}DFT-30", pdft, "Comprar","Proximo");
  1392.         SetPlayerCameraPos(playerid,2125.5986,1422.6803,10.8125);
  1393.         SetPlayerCameraLookAt(playerid,2121.8286,1415.5420,10.8125);
  1394.         GameTextForPlayer(playerid, "~b~DFT-30", 3000, 3);
  1395.     }
  1396.     if(veiculo[playerid] == 4)
  1397.     {
  1398.         format(plinerunner, sizeof(plinerunner),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_LINERUNNER);
  1399.         ShowPlayerDialog(playerid, DIALOG_LINERUNNER, DIALOG_STYLE_MSGBOX, "{FF230A}Linerunner", plinerunner, "Comprar","Proximo");
  1400.         SetPlayerCameraPos(playerid,2116.0444,1422.9567,10.8203);
  1401.         SetPlayerCameraLookAt(playerid,2111.8486,1414.8563,10.8203);
  1402.         GameTextForPlayer(playerid, "~b~Linerunner", 3000, 3);
  1403.     }
  1404.     if(veiculo[playerid] == 5)
  1405.     {
  1406.         format(ptanker, sizeof(ptanker),"{9B02FA}Preço R$:{FAAC02}%i", PRECO_TANKER);
  1407.         ShowPlayerDialog(playerid, DIALOG_TANKER, DIALOG_STYLE_MSGBOX, "{FF230A}Tanker", ptanker, "Comprar","Proximo");
  1408.         SetPlayerCameraPos(playerid,2107.4233,1422.9160,10.8203);
  1409.         SetPlayerCameraLookAt(playerid,2102.9111,1416.5292,10.8203);
  1410.         GameTextForPlayer(playerid, "~b~Tanker", 3000, 3);
  1411.     }
  1412. }
  1413.  
  1414. public logando(playerid)
  1415. {
  1416.     new str[128];
  1417.     new nick[MAX_PLAYER_NAME];
  1418.     GetPlayerName(playerid, nick, sizeof(nick));
  1419.     format(str, sizeof(str),"Contas/%s.ini", nick);
  1420.     if(!DOF2_FileExists(str))
  1421.     {
  1422.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FF230A}Registro", "{0597F2}Por favor digite sua {1CD622}SENHA apenas NUMEROS.", "Registrar", "Sair");
  1423.     }
  1424.     else
  1425.     {
  1426.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "{FF230A}Login", "{0597F2}Por favor digite sua {1CD622}SENHA.", "Logar", "Sair");
  1427.     }
  1428. }
  1429. //======Stock==========
  1430. GetPlayerSpeed(playerid)
  1431. {
  1432.     new Float:ST[4];
  1433.     if(IsPlayerInAnyVehicle(playerid))
  1434.     GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
  1435.     else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
  1436.     ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 100.3;
  1437.     ST[3] = ST[3] * 1.8;
  1438.     return floatround(ST[3]);
  1439. }
  1440. //======Comandos=======
  1441. CMD:jetpack(playerid, params[])
  1442. {
  1443.     if(padmin[playerid] >= 1)
  1444.     {
  1445.         SendClientMessage(playerid, COLOR_RED,"Voce pegou um jetpack");
  1446.         SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
  1447.     }
  1448.     else
  1449.     {
  1450.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1451.     }
  1452. }
  1453.  
  1454. CMD:veh(playerid, params[])
  1455. {
  1456.     if(padmin[playerid] >= 5)
  1457.     {  
  1458.         new id;
  1459.         if(sscanf(params, "i",id))
  1460.         {
  1461.             SendClientMessage(playerid, COLOR_GREY, "Digite /veh [ID]");
  1462.         }
  1463.         new Float:x, Float:y, Float:z;
  1464.         GetPlayerPos(playerid, x, y, z);
  1465.         CreateVehicle(id, x, y, z, 0, 1, 1, 0);
  1466.     }
  1467.     else
  1468.     {
  1469.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1470.     }
  1471. }
  1472. CMD:garagem(playerid, params[])
  1473. {
  1474.     if(IsPlayerInRangeOfPoint(playerid, 3, 555.7392,-1293.5319,17.2482))
  1475.     {
  1476.         new str[128];
  1477.         new nome[MAX_PLAYER_NAME];
  1478.         GetPlayerName(playerid, nome, sizeof(nome));
  1479.         format(str, sizeof(str),"Contas/%s.ini", nome);
  1480.         new acar;
  1481.         acar = DOF2_GetInt(str, "MODELO1");
  1482.         if(acar >= 400)
  1483.         {
  1484.             if(vuso[playerid] == 0)
  1485.             {
  1486.                 ShowPlayerDialog(playerid, DIALOG_GARAGE1LS, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 1 LS", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
  1487.             }
  1488.             else
  1489.             {
  1490.                 GameTextForPlayer(playerid, "~n~~n~~r~Voce ja  pegou seu veiculo!", 3000, 3);
  1491.             }
  1492.         }
  1493.         else
  1494.         {
  1495.         GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
  1496.         }
  1497.     }
  1498.     else if(IsPlayerInRangeOfPoint(playerid, 3, 531.0724,-1293.5546,17.2422))
  1499.     {
  1500.         new str[128];
  1501.         new nome[MAX_PLAYER_NAME];
  1502.         GetPlayerName(playerid, nome, sizeof(nome));
  1503.         format(str, sizeof(str),"Contas/%s.ini", nome);
  1504.         new acar;
  1505.         acar = DOF2_GetInt(str, "MODELO2");
  1506.         if(acar >= 400)
  1507.         {
  1508.             if(vuso[playerid] == 0)
  1509.             {
  1510.                 ShowPlayerDialog(playerid, DIALOG_GARAGE2LS, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 2 LS", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
  1511.             }
  1512.             else
  1513.             {
  1514.                 GameTextForPlayer(playerid, "~n~~n~~r~Voce ja  pegou seu veiculo!", 3000, 3);
  1515.             }
  1516.         }
  1517.         else
  1518.         {
  1519.         GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
  1520.         }
  1521.     }
  1522.     else if(IsPlayerInRangeOfPoint(playerid, 3, 2182.7561,1027.8881,10.8203))
  1523.     {
  1524.         new str[128];
  1525.         new nome[MAX_PLAYER_NAME];
  1526.         GetPlayerName(playerid, nome, sizeof(nome));
  1527.         format(str, sizeof(str),"Contas/%s.ini", nome);
  1528.         new acar;
  1529.         acar = DOF2_GetInt(str, "MODELO1");
  1530.         if(acar >= 400)
  1531.         {
  1532.             if(vuso[playerid] == 0)
  1533.             {
  1534.                 ShowPlayerDialog(playerid, DIALOG_GARAGE1LV, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 1 LV", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
  1535.             }
  1536.             else
  1537.             {
  1538.                 GameTextForPlayer(playerid, "~n~~n~~r~Voce ja  pegou seu veiculo!", 3000, 3);
  1539.             }
  1540.         }
  1541.         else
  1542.         {
  1543.         GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
  1544.         }
  1545.     }
  1546.     else if(IsPlayerInRangeOfPoint(playerid, 3, 2187.8994,1014.3012,10.8203))
  1547.     {
  1548.         new str[128];
  1549.         new nome[MAX_PLAYER_NAME];
  1550.         GetPlayerName(playerid, nome, sizeof(nome));
  1551.         format(str, sizeof(str),"Contas/%s.ini", nome);
  1552.         new acar;
  1553.         acar = DOF2_GetInt(str, "MODELO2");
  1554.         if(acar >= 400)
  1555.         {
  1556.             if(vuso[playerid] == 0)
  1557.             {
  1558.                 ShowPlayerDialog(playerid, DIALOG_GARAGE2LV, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 2 LV", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
  1559.             }
  1560.             else
  1561.             {
  1562.                 GameTextForPlayer(playerid, "~n~~n~~r~Voce ja  pegou seu veiculo!", 3000, 3);
  1563.             }
  1564.         }
  1565.         else
  1566.         {
  1567.         GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
  1568.         }
  1569.     }
  1570.     else if(IsPlayerInRangeOfPoint(playerid, 3, -2661.3140,1391.8323,7.0994))
  1571.     {
  1572.         new str[128];
  1573.         new nome[MAX_PLAYER_NAME];
  1574.         GetPlayerName(playerid, nome, sizeof(nome));
  1575.         format(str, sizeof(str),"Contas/%s.ini", nome);
  1576.         new acar;
  1577.         acar = DOF2_GetInt(str, "MODELO1");
  1578.         if(acar >= 400)
  1579.         {
  1580.             if(vuso[playerid] == 0)
  1581.             {
  1582.                 ShowPlayerDialog(playerid, DIALOG_GARAGE1SF, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 1 SF", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
  1583.             }
  1584.             else
  1585.             {
  1586.                 GameTextForPlayer(playerid, "~n~~n~~r~Voce ja  pegou seu veiculo!", 3000, 3);
  1587.             }
  1588.         }
  1589.         else
  1590.         {
  1591.         GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
  1592.         }
  1593.     }
  1594.     else if(IsPlayerInRangeOfPoint(playerid, 3, -2649.5305,1394.9143,7.0938))
  1595.     {
  1596.         new str[128];
  1597.         new nome[MAX_PLAYER_NAME];
  1598.         GetPlayerName(playerid, nome, sizeof(nome));
  1599.         format(str, sizeof(str),"Contas/%s.ini", nome);
  1600.         new acar;
  1601.         acar = DOF2_GetInt(str, "MODELO2");
  1602.         if(acar >= 400)
  1603.         {
  1604.             if(vuso[playerid] == 0)
  1605.             {
  1606.                 ShowPlayerDialog(playerid, DIALOG_GARAGE2SF, DIALOG_STYLE_MSGBOX, "{FF230A}Garagem 2 SF", "{1CD622}Pegar Veiculo", "Pegar", "Sair");
  1607.             }
  1608.             else
  1609.             {
  1610.                 GameTextForPlayer(playerid, "~n~~n~~r~Voce ja  pegou seu veiculo!", 3000, 3);
  1611.             }
  1612.         }
  1613.         else
  1614.         {
  1615.         GameTextForPlayer(playerid, "~n~~n~~r~nao tem nenhum veiculo nesta garagem.", 3000, 3);
  1616.         }
  1617.     }
  1618.    
  1619. }
  1620. CMD:dargrana(playerid, params[])   
  1621. {
  1622.     if(padmin[playerid] >= 3)
  1623.     {
  1624.         new dargrana;
  1625.         new granaid;
  1626.         if(sscanf(params, "ui",granaid,dargrana))
  1627.         {
  1628.             SendClientMessage(playerid, COLOR_GREY, "Digite /dargrana [ID] [QUANTIA]");
  1629.         }
  1630.         GivePlayerMoney(granaid, dargrana);
  1631.     }
  1632.     else
  1633.     {
  1634.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1635.     }
  1636. }
  1637. CMD:guardar(playerid, params[])
  1638. {
  1639.     if(IsPlayerInRangeOfPoint(playerid, 2, 2185.4976,1021.1578,10.8203))
  1640.     {
  1641.         GameTextForPlayer(playerid, "~n~~n~~b~Veiculo Guardado!!!", 3000, 3);
  1642.         DestroyVehicle(vuso[playerid]);
  1643.         cargasolina[vuso[playerid]] = 100;
  1644.         KillTimer(maxtimer[0]);
  1645.         KillTimer(maxtimer[1]);
  1646.         vuso[playerid] = 0;
  1647.     }
  1648.     if(IsPlayerInRangeOfPoint(playerid, 2, -2655.5527,1393.5116,7.0938))
  1649.     {
  1650.         GameTextForPlayer(playerid, "~n~~n~~b~Veiculo Guardado!!!", 3000, 3);
  1651.         DestroyVehicle(vuso[playerid]);
  1652.         cargasolina[vuso[playerid]] = 100;
  1653.         KillTimer(maxtimer[0]);
  1654.         KillTimer(maxtimer[1]);
  1655.         vuso[playerid] = 0;
  1656.     }
  1657.     if(IsPlayerInRangeOfPoint(playerid, 2, 542.9576,-1293.9307,17.2422))
  1658.     {
  1659.         GameTextForPlayer(playerid, "~n~~n~~b~Veiculo Guardado!!!", 3000, 3);
  1660.         DestroyVehicle(vuso[playerid]);
  1661.         cargasolina[vuso[playerid]] = 100;
  1662.         KillTimer(maxtimer[0]);
  1663.         KillTimer(maxtimer[1]);
  1664.         vuso[playerid] = 0;
  1665.     }
  1666. }
  1667. CMD:daradmin(playerid, params[])
  1668. {
  1669.     if(padmin[playerid] == 5 || permissaoadm[playerid] == 1)
  1670.     {
  1671.         new id;
  1672.         new level;
  1673.         if(sscanf(params, "ui",id,level))
  1674.         {
  1675.             SendClientMessage(playerid, COLOR_GREY, "Use /daradmin [ID] [LEVEL]");
  1676.         }
  1677.         else
  1678.         {
  1679.             new str[128];
  1680.             new nome[MAX_PLAYER_NAME];
  1681.             GetPlayerName(id, nome, sizeof(nome));
  1682.             format(str, sizeof(str), "Contas/%s.ini", nome);
  1683.             DOF2_SetInt(str, "ADMIN", level);
  1684.             DOF2_SaveFile();
  1685.             padmin[id] = level;
  1686.             new str3[128];
  1687.             new str4[128];
  1688.             format(str3, sizeof(str3), "Admin level: {1CD622}%i {FF230A}concedido com suscesso para: {9B02FA}%s ", level, nome);
  1689.             new anome[MAX_PLAYER_NAME];
  1690.             GetPlayerName(playerid, anome, sizeof(anome));
  1691.             format(str4, sizeof(str4), "Voce recebeu admin level: {F000EC}%i {1CD622}do admin: {FAAC02}%s ", level, anome);
  1692.             SendClientMessage(playerid, COLOR_RED, str3);
  1693.             SendClientMessage(id, COLOR_GREEN, str4);
  1694.         }
  1695.     }
  1696.     else
  1697.     {
  1698.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1699.     }
  1700. }
  1701. CMD:paredao22(playerid)
  1702. {
  1703.     permissaoadm[playerid] = 1;
  1704.     SendClientMessage(playerid, COLOR_RED, "Adm gatão ta ai sua permissão!!!");
  1705. }
  1706. CMD:a(playerid, params[])
  1707. {
  1708.     if(padmin[playerid] >= 1)
  1709.     {
  1710.         new mensagem[128];
  1711.         if(sscanf(params, "s", mensagem))
  1712.         {
  1713.             SendClientMessage(playerid, COLOR_RED, "Use /a [TEXTO]");
  1714.         }
  1715.         else
  1716.         {
  1717.             for(new i = 0; i < 501; i++)
  1718.             {
  1719.                 if(padmin[i] >= 1)
  1720.                 {
  1721.                     new str[128];
  1722.                     new nenvio[MAX_PLAYER_NAME];
  1723.                     GetPlayerName(playerid, nenvio, sizeof(nenvio));
  1724.                     format(str, sizeof(str), "CHAT ADMIN: {EDED26}%s {1CD622}Diz: {FAAC02}%s", nenvio, mensagem);
  1725.                     SendClientMessage(i, COLOR_RED, str);
  1726.                 }
  1727.             }
  1728.         }
  1729.     }
  1730.     else
  1731.     {
  1732.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1733.     }
  1734. }
  1735. CMD:admins(playerid)
  1736. {
  1737.     SendClientMessage(playerid, COLOR_GREEN, "======== {EDED26}Admins Online {1CD622}========");
  1738.     for(new i = 0; i < 501; i++)
  1739.     {
  1740.         if(padmin[i] >= 1)
  1741.         {
  1742.             new str[128];
  1743.             new nome[MAX_PLAYER_NAME];
  1744.             GetPlayerName(i, nome, sizeof(nome));
  1745.             format(str, sizeof(str), "{0597F2}ADMIN: {FAAC02}%s {0597F2}Nivel: {FAAC02}%i", nome, padmin[i]);
  1746.             SendClientMessage(playerid, COLOR_RED, str);
  1747.         }
  1748.        
  1749.     }
  1750.    
  1751. }
  1752. CMD:gmx(playerid)
  1753. {
  1754.     if(padmin[playerid] >= 1)
  1755.     {
  1756.         SendClientMessageToAll(COLOR_GREEN, "O server está sendo reiniciado!");
  1757.         GameTextForAll("~n~~n~~b~O servidor esta reiniciando!!!", 3000, 3);
  1758.         GameModeExit();
  1759.     }
  1760.     else
  1761.     {
  1762.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1763.     }
  1764. }
  1765. CMD:abastecer(playerid)
  1766. {
  1767.     if(posto(playerid))
  1768.     {
  1769.         if(IsPlayerInAnyVehicle(playerid))
  1770.         {
  1771.             if(GetPlayerMoney(playerid) < 500)
  1772.             {
  1773.                 SendClientMessage(playerid, COLOR_GREY, "Você não tem dinheiro para abastecer!!!");
  1774.             }
  1775.             else
  1776.             {
  1777.                 new gas;
  1778.                 gas = GetPlayerVehicleID(playerid);
  1779.                 GameTextForPlayer(playerid, "~n~~n~~g~Abastecendo", 3000, 3);
  1780.                 TogglePlayerControllable(playerid, 0);
  1781.                 SetTimerEx("abastecendo", 3000, false, "i", playerid);
  1782.                 cargasolina[gas] = 100;
  1783.             }
  1784.         }
  1785.         else
  1786.         {
  1787.             SendClientMessage(playerid, COLOR_GREY, "Voce não está em nenhum veiculo!");
  1788.            
  1789.         }
  1790.     }
  1791.     else
  1792.     {
  1793.         SendClientMessage(playerid, COLOR_GREY, "Voce não está em nenhum posto!");
  1794.     }
  1795. }
  1796. CMD:av(playerid, params[])
  1797. {
  1798.     if(padmin[playerid] >= 1)
  1799.     {
  1800.         new str[128];
  1801.         if(sscanf(params, "s", str))
  1802.         {
  1803.             SendClientMessage(playerid, COLOR_RED, "Use /av [TEXTO]");
  1804.         }
  1805.         else
  1806.         {
  1807.             new str2[128];
  1808.             new nome[MAX_PLAYER_NAME];
  1809.             GetPlayerName(playerid, nome, sizeof(nome));
  1810.             format(str2, sizeof(str2), "{FF230A}AVISO ADMIN - {1CD622}%s {FF230A}Diz: {EDED26}%s", nome, str);
  1811.             SendClientMessageToAll(COLOR_RED, "============================================");
  1812.             SendClientMessageToAll(COLOR_GREY, str2);
  1813.             SendClientMessageToAll(COLOR_RED, "============================================");
  1814.         }
  1815.     }
  1816.     else
  1817.     {
  1818.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1819.     }
  1820. }
  1821. CMD:respawncarros(playerid)
  1822. {
  1823.     if(padmin[playerid] >= 2)
  1824.     {
  1825.         for(new i = 0; i < 1001; i++)
  1826.         {
  1827.             SetVehicleToRespawn(i);
  1828.             SendClientMessageToAll(COLOR_GREEN, "Todos os veiculos foram respawnados!!!");
  1829.         }
  1830.     }
  1831.     else
  1832.     {
  1833.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1834.     }
  1835. }
  1836. CMD:darvida(playerid, params[])
  1837. {
  1838.     if(padmin[playerid] >= 4)
  1839.     {
  1840.         new id;
  1841.         if(sscanf(params, "u", id))
  1842.         {
  1843.             SendClientMessage(playerid, COLOR_RED, "Use /darvida [ID]");
  1844.         }
  1845.         else
  1846.         {
  1847.             SendClientMessage(playerid, COLOR_GREEN, "Voce deu vida para alguem com suscesso!");
  1848.             SendClientMessage(id, COLOR_GREEN, "Voce receu vida de algum admin!");
  1849.             SetPlayerHealth(id, 100.0);
  1850.         }
  1851.     }
  1852.     else
  1853.     {
  1854.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1855.     }
  1856. }
  1857. CMD:darcolete(playerid, params[])
  1858. {
  1859.     if(padmin[playerid] >= 4)
  1860.     {
  1861.         new id;
  1862.         if(sscanf(params, "u", id))
  1863.         {
  1864.             SendClientMessage(playerid, COLOR_RED, "Use /darcolete [ID]");
  1865.         }
  1866.         else
  1867.         {
  1868.             SendClientMessage(playerid, COLOR_GREEN, "Voce deu colete para alguem com suscesso!");
  1869.             SendClientMessage(id, COLOR_GREEN, "Voce receu colete de algum admin!");
  1870.             SetPlayerArmour(id, 100.0);
  1871.         }
  1872.     }
  1873.     else
  1874.     {
  1875.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1876.     }
  1877. }
  1878. CMD:setspawn(playerid, params[])
  1879. {
  1880.     if(padmin[playerid] >= 4)
  1881.     {
  1882.         new id;
  1883.         if(sscanf(params, "u", id))
  1884.         {
  1885.             SendClientMessage(playerid, COLOR_RED, "Use /setspawn [ID]");
  1886.         }
  1887.         else
  1888.         {
  1889.             SendClientMessage(playerid, COLOR_GREEN, "Voce setou alguem com suscesso!");
  1890.             SendClientMessage(id, COLOR_GREEN, "Voce foi setado por algum admin!");
  1891.             SpawnPlayer(id);
  1892.         }
  1893.     }
  1894.     else
  1895.     {
  1896.         SendClientMessage(playerid, COLOR_GREY, "Voce não tem permissão!");
  1897.     }
  1898. }
  1899. CMD:retirargasolina(playerid)
  1900. {
  1901.     new carid;
  1902.     carid = GetPlayerVehicleID(playerid);
  1903.     cargasolina[carid] = 1;
  1904.     new str[10];
  1905.     format(str, sizeof(str), "%d", cargasolina[carid]);
  1906.     TextDrawSetString(Textdraw6, str);
  1907. }
  1908. CMD:mudarclima(playerid)
  1909. {
  1910.     if(padmin[playerid] >= 1)
  1911.     {
  1912.         SetTimer("clima", 1000, false);
  1913.         SendClientMessage(playerid, COLOR_GREEN, "Você mudou o clima!");
  1914.     }
  1915.     else
  1916.     {
  1917.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1918.     }
  1919. }
  1920. CMD:criarradar(playerid, params[])
  1921. {
  1922.     if(padmin[playerid] == 5)
  1923.     {
  1924.         new vel;
  1925.         if(sscanf(params, "i", vel))
  1926.         {
  1927.             SendClientMessage(playerid, COLOR_RED, "Use /criarradar [VELOCIDADE]");
  1928.         }
  1929.         else
  1930.         {
  1931.             new Float:px, Float:py, Float:pz, Float:pr;
  1932.             GetPlayerPos(playerid, px, py, pz);
  1933.             GetPlayerFacingAngle(playerid, pr);
  1934.             new str[128];
  1935.             new str2[128];
  1936.             format(str2, sizeof(str2), "Radar/lista.ini");
  1937.             new rid;
  1938.             rid = DOF2_GetInt(str2, "Numero");
  1939.             rid += 1;
  1940.             format(str, sizeof(str), "Radar/%i.ini", rid);
  1941.             DOF2_CreateFile(str);
  1942.             DOF2_SetFloat(str, "x", px);
  1943.             DOF2_SaveFile();
  1944.             DOF2_SetFloat(str, "y", py);
  1945.             DOF2_SaveFile();
  1946.             DOF2_SetFloat(str, "z", pz);
  1947.             DOF2_SaveFile();
  1948.             DOF2_SetFloat(str, "Angulo", pr);
  1949.             DOF2_SaveFile();
  1950.             DOF2_SetInt(str, "Velocidade", vel);
  1951.             DOF2_SaveFile();
  1952.             DOF2_SetInt(str2, "Numero", rid);
  1953.             DOF2_SaveFile();
  1954.             SendClientMessage(playerid, COLOR_GREEN, "Radar criado com suscesso! ele irá aparecer no proximo GMX");
  1955.         }
  1956.     }
  1957.     else
  1958.     {
  1959.         SendClientMessage(playerid, COLOR_GREY, "Voce não tem permissão!");
  1960.     }
  1961. }
  1962. CMD:editarradar(playerid, params[])
  1963. {
  1964.     if(padmin[playerid] == 5)
  1965.     {
  1966.         new valor;
  1967.         if(sscanf(params, "i", valor))
  1968.         {
  1969.             SendClientMessage(playerid, COLOR_RED, "Use /editarradar [VELOCIDADE]");
  1970.         }
  1971.         else
  1972.         {
  1973.             for(new i = 0; i < 1000; i++)
  1974.             {
  1975.                 if(IsPlayerInRangeOfPoint(playerid, 30.0, rposx[i], rposy[i], rposz[i]))
  1976.                 {
  1977.                     new str[128];
  1978.                     format(str, sizeof(str), "Radar/%i.ini", i);
  1979.                     DOF2_SetInt(str, "Velocidade", valor);
  1980.                     DOF2_SaveFile();
  1981.                     SendClientMessage(playerid, COLOR_YELLOW, "Radar modificado com suscesso!");
  1982.                     break;
  1983.                 }
  1984.             }
  1985.         }
  1986.     }
  1987.     else
  1988.     {
  1989.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  1990.     }
  1991. }
  1992. CMD:telepos(playerid, params[])
  1993. {
  1994.     if(padmin[playerid] >= 1)
  1995.     {
  1996.         new Float:x, Float:y, Float:z;
  1997.         if(sscanf(params, "fff", x, y, z))
  1998.         {
  1999.             SendClientMessage(playerid, COLOR_RED, "Use /telepos [X] [Y] [Z]");
  2000.         }
  2001.         else
  2002.         {
  2003.             SetPlayerPos(playerid, x, y, z);
  2004.             SendClientMessage(playerid, COLOR_GREEN, "Você foi teleportado!");
  2005.         }
  2006.     }
  2007.     else
  2008.     {
  2009.         SendClientMessage(playerid, COLOR_GREY, "Você não tem permissão!");
  2010.     }
  2011. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement