Guest User

SpeedoMeter AmericanStyle'™

a guest
Jul 7th, 2012
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 15.96 KB | None | 0 0
  1. /*
  2.             Sistema Feito Toltalmente Por AmericanStyle'™
  3.           Não Foram Detectados Bugs Ou Anormalias do Mesmo
  4.           Espero Que Gostem e que faça do Proveito do Mesmo.
  5. */
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. #include        <a_samp>
  16.  
  17.  
  18.  
  19.  
  20. new Float:Pos[4], spe;
  21. new Velo;
  22.  
  23. new Text:Velocidade0[MAX_PLAYERS];
  24. new Text:Velocidade1[MAX_PLAYERS];
  25. new Text:Velocidade2[MAX_PLAYERS];
  26. new Text:Velocidade3[MAX_PLAYERS];
  27. new Text:Velocidade4[MAX_PLAYERS];
  28. new Text:Velocidade5[MAX_PLAYERS];
  29. new Text:Velocidade6[MAX_PLAYERS];
  30. new Text:Velocidade7[MAX_PLAYERS];
  31. new Text:Velocidade8[MAX_PLAYERS];
  32. new Text:Velocidade9[MAX_PLAYERS];
  33. new Text:Velocidade10[MAX_PLAYERS];
  34. new Text:Velocidade11[MAX_PLAYERS];
  35. new Text:Velocidade12[MAX_PLAYERS];
  36. new Text:Velocidade18[MAX_PLAYERS];
  37.  
  38.  
  39. #define Loop(%0,%1) for(new %0; %0 < %1; ++%0)
  40.  
  41.  
  42. forward Velocimetro();
  43.  
  44. new Veiculos[][] =
  45. {
  46.         "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
  47.         "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
  48.         "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
  49.         "Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
  50.         "Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
  51.         "Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
  52.         "Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
  53.         "Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
  54.         "Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
  55.         "Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
  56.         "Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
  57.         "Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
  58.         "Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
  59.         "Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
  60.         "Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
  61.         "Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
  62.         "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
  63.         "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
  64.         "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
  65.         "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
  66.         "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
  67.         "Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
  68.         "Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
  69.         "Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
  70.         "Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
  71.         "Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
  72.         "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
  73.         "News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
  74.         "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
  75.         "Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
  76.         "Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
  77.         "Tiller", "Utility Trailer"
  78. };
  79.  
  80. public OnFilterScriptInit()
  81. {
  82.  
  83.     print("Velocimetro AmericanStyle'");
  84.     print("Velocimetro AmericanStyle'");
  85.     print("Velocimetro AmericanStyle'");
  86.     print("Use e Abuse");
  87.    
  88.     Velo = SetTimer("Velocimetro",100,true);
  89.    
  90.     Loop(i,MAX_PLAYERS)
  91.     {
  92.         Velocidade0[i] = TextDrawCreate(250.000000, 412.000000, "~g~lll");
  93.         TextDrawBackgroundColor(Velocidade0[i], 255);
  94.         TextDrawFont(Velocidade0[i], 1);
  95.         TextDrawLetterSize(Velocidade0[i], 0.240000, 2.999999);
  96.         TextDrawColor(Velocidade0[i], -1);
  97.         TextDrawSetOutline(Velocidade0[i], 1);
  98.         TextDrawSetProportional(Velocidade0[i], 1);
  99.  
  100.         Velocidade1[i] = TextDrawCreate(258.000000, 412.000000, "~g~lll");
  101.         TextDrawBackgroundColor(Velocidade1[i], 255);
  102.         TextDrawFont(Velocidade1[i], 1);
  103.         TextDrawLetterSize(Velocidade1[i], 0.240000, 2.999999);
  104.         TextDrawColor(Velocidade1[i], -1);
  105.         TextDrawSetOutline(Velocidade1[i], 1);
  106.         TextDrawSetProportional(Velocidade1[i], 1);
  107.  
  108.         Velocidade2[i] = TextDrawCreate(266.000000, 412.000000, "~g~lll");
  109.         TextDrawBackgroundColor(Velocidade2[i], 255);
  110.         TextDrawFont(Velocidade2[i], 1);
  111.         TextDrawLetterSize(Velocidade2[i], 0.240000, 2.999999);
  112.         TextDrawColor(Velocidade2[i], -1);
  113.         TextDrawSetOutline(Velocidade2[i], 1);
  114.         TextDrawSetProportional(Velocidade2[i], 1);
  115.  
  116.         Velocidade3[i] = TextDrawCreate(274.000000, 412.000000, "~g~lll");
  117.         TextDrawBackgroundColor(Velocidade3[i], 255);
  118.         TextDrawFont(Velocidade3[i], 1);
  119.         TextDrawLetterSize(Velocidade3[i], 0.240000, 2.999999);
  120.         TextDrawColor(Velocidade3[i], -1);
  121.         TextDrawSetOutline(Velocidade3[i], 1);
  122.         TextDrawSetProportional(Velocidade3[i], 1);
  123.  
  124.         Velocidade4[i] = TextDrawCreate(282.000000, 412.000000, "~y~lll");
  125.         TextDrawBackgroundColor(Velocidade4[i], 255);
  126.         TextDrawFont(Velocidade4[i], 1);
  127.         TextDrawLetterSize(Velocidade4[i], 0.240000, 2.999999);
  128.         TextDrawColor(Velocidade4[i], -1);
  129.         TextDrawSetOutline(Velocidade4[i], 1);
  130.         TextDrawSetProportional(Velocidade4[i], 1);
  131.  
  132.         Velocidade5[i] = TextDrawCreate(290.000000, 412.000000, "~y~lll");
  133.         TextDrawBackgroundColor(Velocidade5[i], 255);
  134.         TextDrawFont(Velocidade5[i], 1);
  135.         TextDrawLetterSize(Velocidade5[i], 0.240000, 2.999999);
  136.         TextDrawColor(Velocidade5[i], -1);
  137.         TextDrawSetOutline(Velocidade5[i], 1);
  138.         TextDrawSetProportional(Velocidade5[i], 1);
  139.  
  140.         Velocidade6[i] = TextDrawCreate(298.000000, 412.000000, "~y~lll");
  141.         TextDrawBackgroundColor(Velocidade6[i], 255);
  142.         TextDrawFont(Velocidade6[i], 1);
  143.         TextDrawLetterSize(Velocidade6[i], 0.240000, 2.999999);
  144.         TextDrawColor(Velocidade6[i], -1);
  145.         TextDrawSetOutline(Velocidade6[i], 1);
  146.         TextDrawSetProportional(Velocidade6[i], 1);
  147.  
  148.         Velocidade7[i] = TextDrawCreate(306.000000, 412.000000, "~y~lll");
  149.         TextDrawBackgroundColor(Velocidade7[i], 255);
  150.         TextDrawFont(Velocidade7[i], 1);
  151.         TextDrawLetterSize(Velocidade7[i], 0.240000, 2.999999);
  152.         TextDrawColor(Velocidade7[i], -1);
  153.         TextDrawSetOutline(Velocidade7[i], 1);
  154.         TextDrawSetProportional(Velocidade7[i], 1);
  155.  
  156.         Velocidade8[i] = TextDrawCreate(314.000000, 412.000000, "~r~lll");
  157.         TextDrawBackgroundColor(Velocidade8[i], 255);
  158.         TextDrawFont(Velocidade8[i], 1);
  159.         TextDrawLetterSize(Velocidade8[i], 0.240000, 2.999999);
  160.         TextDrawColor(Velocidade8[i], -1);
  161.         TextDrawSetOutline(Velocidade8[i], 1);
  162.         TextDrawSetProportional(Velocidade8[i], 1);
  163.  
  164.         Velocidade9[i] = TextDrawCreate(322.000000, 412.000000, "~r~lll");
  165.         TextDrawBackgroundColor(Velocidade9[i], 255);
  166.         TextDrawFont(Velocidade9[i], 1);
  167.         TextDrawLetterSize(Velocidade9[i], 0.240000, 2.999999);
  168.         TextDrawColor(Velocidade9[i], -1);
  169.         TextDrawSetOutline(Velocidade9[i], 1);
  170.         TextDrawSetProportional(Velocidade9[i], 1);
  171.  
  172.         Velocidade10[i] = TextDrawCreate(338.000000, 412.000000, "~r~lll");
  173.         TextDrawBackgroundColor(Velocidade10[i], 255);
  174.         TextDrawFont(Velocidade10[i], 1);
  175.         TextDrawLetterSize(Velocidade10[i], 0.240000, 2.999999);
  176.         TextDrawColor(Velocidade10[i], -1);
  177.         TextDrawSetOutline(Velocidade10[i], 1);
  178.         TextDrawSetProportional(Velocidade10[i], 1);
  179.  
  180.         Velocidade11[i] = TextDrawCreate(330.000000, 412.000000, "~r~lll");
  181.         TextDrawBackgroundColor(Velocidade11[i], 255);
  182.         TextDrawFont(Velocidade11[i], 1);
  183.         TextDrawLetterSize(Velocidade11[i], 0.240000, 2.999999);
  184.         TextDrawColor(Velocidade11[i], -1);
  185.         TextDrawSetOutline(Velocidade11[i], 1);
  186.         TextDrawSetProportional(Velocidade11[i], 1);
  187.  
  188.         Velocidade18[i] = TextDrawCreate(298.000000, 391.000000, "Veiculo");
  189.         TextDrawAlignment(Velocidade18[i], 2);
  190.         TextDrawBackgroundColor(Velocidade18[i], 6655);
  191.         TextDrawFont(Velocidade18[i], 1);
  192.         TextDrawLetterSize(Velocidade18[i], 0.240000, 2.999999);
  193.         TextDrawColor(Velocidade18[i], -1);
  194.         TextDrawSetOutline(Velocidade18[i], 1);
  195.         TextDrawSetProportional(Velocidade18[i], 1);
  196.     }
  197.     return 1;
  198. }
  199.  
  200. public OnFilterScriptExit()
  201. {
  202.     KillTimer(Velo);
  203.     Loop(i,MAX_PLAYERS)
  204.     {
  205.         TextDrawHideForAll(Velocidade0[i]);
  206.         TextDrawDestroy(Velocidade0[i]);
  207.         TextDrawHideForAll(Velocidade1[i]);
  208.         TextDrawDestroy(Velocidade1[i]);
  209.         TextDrawHideForAll(Velocidade2[i]);
  210.         TextDrawDestroy(Velocidade2[i]);
  211.         TextDrawHideForAll(Velocidade3[i]);
  212.         TextDrawDestroy(Velocidade3[i]);
  213.         TextDrawHideForAll(Velocidade4[i]);
  214.         TextDrawDestroy(Velocidade4[i]);
  215.         TextDrawHideForAll(Velocidade5[i]);
  216.         TextDrawDestroy(Velocidade5[i]);
  217.         TextDrawHideForAll(Velocidade6[i]);
  218.         TextDrawDestroy(Velocidade6[i]);
  219.         TextDrawHideForAll(Velocidade7[i]);
  220.         TextDrawDestroy(Velocidade7[i]);
  221.         TextDrawHideForAll(Velocidade8[i]);
  222.         TextDrawDestroy(Velocidade8[i]);
  223.         TextDrawHideForAll(Velocidade9[i]);
  224.         TextDrawDestroy(Velocidade9[i]);
  225.         TextDrawHideForAll(Velocidade10[i]);
  226.         TextDrawDestroy(Velocidade10[i]);
  227.         TextDrawHideForAll(Velocidade11[i]);
  228.         TextDrawDestroy(Velocidade11[i]);
  229.         TextDrawHideForAll(Velocidade12[i]);
  230.         TextDrawDestroy(Velocidade12[i]);
  231.         TextDrawHideForAll(Velocidade18[i]);
  232.         TextDrawDestroy(Velocidade18[i]);
  233.     }
  234.     return 1;
  235. }
  236. public Velocimetro()
  237. {
  238.     Loop(i,MAX_PLAYERS)
  239.     {
  240.         if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
  241.         {
  242.        
  243.             new str[15];
  244.             format(str,sizeof(str),"%s", Veiculos[GetVehicleModel(GetPlayerVehicleID(i))-400]);
  245.             TextDrawSetString(Velocidade18[i], str);
  246.             TextDrawShowForPlayer(i, Velocidade18[i]);
  247.        
  248.             if(Velocidade(i) == 40 || Velocidade(i) <= 50)
  249.             {
  250.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  251.                 TextDrawHideForPlayer(i, Velocidade1[i]);
  252.             }
  253.             else if(Velocidade(i) == 51 || Velocidade(i) <= 70)
  254.             {
  255.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  256.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  257.                 TextDrawHideForPlayer(i, Velocidade2[i]);
  258.             }
  259.             else if(Velocidade(i) == 71 || Velocidade(i) <= 90)
  260.             {
  261.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  262.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  263.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  264.                 TextDrawHideForPlayer(i, Velocidade3[i]);
  265.             }
  266.             else if(Velocidade(i) == 91 || Velocidade(i) <= 120)
  267.             {
  268.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  269.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  270.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  271.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  272.                 TextDrawHideForPlayer(i, Velocidade4[i]);
  273.             }
  274.             else if(Velocidade(i) == 121 || Velocidade(i) <= 140)
  275.             {
  276.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  277.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  278.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  279.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  280.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  281.                 TextDrawHideForPlayer(i, Velocidade5[i]);
  282.             }
  283.             else if(Velocidade(i) == 141 || Velocidade(i) <= 160)
  284.             {
  285.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  286.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  287.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  288.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  289.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  290.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  291.                 TextDrawHideForPlayer(i, Velocidade6[i]);
  292.             }
  293.             else if(Velocidade(i) == 161 || Velocidade(i) <= 180)
  294.             {
  295.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  296.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  297.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  298.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  299.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  300.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  301.                 TextDrawShowForPlayer(i, Velocidade6[i]);
  302.                 TextDrawHideForPlayer(i, Velocidade7[i]);
  303.             }
  304.             else if(Velocidade(i) == 181 || Velocidade(i) <= 200)
  305.             {
  306.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  307.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  308.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  309.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  310.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  311.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  312.                 TextDrawShowForPlayer(i, Velocidade6[i]);
  313.                 TextDrawShowForPlayer(i, Velocidade7[i]);
  314.                 TextDrawHideForPlayer(i, Velocidade8[i]);
  315.             }
  316.             else if(Velocidade(i) == 201 || Velocidade(i) <= 210)
  317.             {
  318.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  319.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  320.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  321.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  322.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  323.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  324.                 TextDrawShowForPlayer(i, Velocidade6[i]);
  325.                 TextDrawShowForPlayer(i, Velocidade7[i]);
  326.                 TextDrawShowForPlayer(i, Velocidade8[i]);
  327.                 TextDrawHideForPlayer(i, Velocidade9[i]);
  328.             }
  329.             else if(Velocidade(i) == 211 || Velocidade(i) <= 220)
  330.             {
  331.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  332.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  333.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  334.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  335.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  336.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  337.                 TextDrawShowForPlayer(i, Velocidade6[i]);
  338.                 TextDrawShowForPlayer(i, Velocidade7[i]);
  339.                 TextDrawShowForPlayer(i, Velocidade8[i]);
  340.                 TextDrawShowForPlayer(i, Velocidade9[i]);
  341.                 TextDrawHideForPlayer(i, Velocidade11[i]);
  342.             }
  343.             else if(Velocidade(i) == 221 || Velocidade(i) <= 230)
  344.             {
  345.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  346.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  347.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  348.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  349.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  350.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  351.                 TextDrawShowForPlayer(i, Velocidade6[i]);
  352.                 TextDrawShowForPlayer(i, Velocidade7[i]);
  353.                 TextDrawShowForPlayer(i, Velocidade8[i]);
  354.                 TextDrawShowForPlayer(i, Velocidade9[i]);
  355.                 TextDrawShowForPlayer(i, Velocidade11[i]);
  356.                 TextDrawHideForPlayer(i, Velocidade10[i]);
  357.             }
  358.             else if(Velocidade(i) == 231 || Velocidade(i) <= 270)
  359.             {
  360.                 TextDrawShowForPlayer(i, Velocidade0[i]);
  361.                 TextDrawShowForPlayer(i, Velocidade1[i]);
  362.                 TextDrawShowForPlayer(i, Velocidade2[i]);
  363.                 TextDrawShowForPlayer(i, Velocidade3[i]);
  364.                 TextDrawShowForPlayer(i, Velocidade4[i]);
  365.                 TextDrawShowForPlayer(i, Velocidade5[i]);
  366.                 TextDrawShowForPlayer(i, Velocidade6[i]);
  367.                 TextDrawShowForPlayer(i, Velocidade7[i]);
  368.                 TextDrawShowForPlayer(i, Velocidade8[i]);
  369.                 TextDrawShowForPlayer(i, Velocidade9[i]);
  370.                 TextDrawShowForPlayer(i, Velocidade11[i]);
  371.                 TextDrawShowForPlayer(i, Velocidade10[i]);
  372.             }
  373.         }
  374.     }
  375.     return 1;
  376. }
  377.    
  378.  
  379. public OnPlayerStateChange(playerid, newstate, oldstate)
  380. {
  381.     if(oldstate == PLAYER_STATE_DRIVER)
  382.     {
  383.         TextDrawHideForPlayer(playerid, Velocidade0[playerid]);
  384.         TextDrawHideForPlayer(playerid, Velocidade1[playerid]);
  385.         TextDrawHideForPlayer(playerid, Velocidade2[playerid]);
  386.         TextDrawHideForPlayer(playerid, Velocidade3[playerid]);
  387.         TextDrawHideForPlayer(playerid, Velocidade4[playerid]);
  388.         TextDrawHideForPlayer(playerid, Velocidade5[playerid]);
  389.         TextDrawHideForPlayer(playerid, Velocidade6[playerid]);
  390.         TextDrawHideForPlayer(playerid, Velocidade7[playerid]);
  391.         TextDrawHideForPlayer(playerid, Velocidade8[playerid]);
  392.         TextDrawHideForPlayer(playerid, Velocidade9[playerid]);
  393.         TextDrawHideForPlayer(playerid, Velocidade10[playerid]);
  394.         TextDrawHideForPlayer(playerid, Velocidade11[playerid]);
  395.         TextDrawHideForPlayer(playerid, Velocidade12[playerid]);
  396.         TextDrawHideForPlayer(playerid, Velocidade18[playerid]);
  397.     }
  398.     return 1;
  399. }
  400.  
  401. stock Velocidade(playerid)
  402. {
  403.         if(IsPlayerInAnyVehicle(playerid))
  404.         {
  405.                 GetVehicleVelocity(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
  406.                 Pos[3] = floatmul(floatsqroot(floatadd(floatadd(floatpower(Pos[0], 2), floatpower(Pos[1], 2)),  floatpower(Pos[2], 2))), 170.0);
  407.                 spe = floatround(Pos[3] * 1);
  408.         }
  409.         else
  410.             return false;
  411.         return spe;
  412. }
Advertisement
Add Comment
Please, Sign In to add comment