- Código:
/*
Velocimetro estilo GTA V
by: otaviotm
*/
#include <a_samp>
#pragma tabsize 0
// (Global Textdraws velocimetro)
new Text:textVelocimetro[5];
// (Player Textdraws velocimetro)
new PlayerText:textPlayerVelocimetro[4][MAX_PLAYERS];
// (Vendo o velocimetro ou não)
new bool:PlayerVelocimetro[MAX_PLAYERS];
// (Timer velocimetro)
new PlayerVelocimetroTimer[MAX_PLAYERS];
stock Float:GetVehicleHealthEx(vehicleid)
{
new Float:health;
GetVehicleHealth(vehicleid, health);
if ( health > 900.0) {
return health / 10.0;
}
else return ( health / 10.0 )-(24);
}
public UpdatePlayerVelocimetro(playerid) {
new playervehicle;
if ( (playervehicle = GetPlayerVehicleID(playerid)) != INVALID_VEHICLE_ID) {
new string_velo[15];
format(string_velo, sizeof (string_velo), "%02d km/h", GetVehicleSpeed(playervehicle));
PlayerTextDrawSetString(playerid, textPlayerVelocimetro[1][playerid], string_velo);
format(string_velo, sizeof (string_velo), "%.0f%", GetVehicleHealthEx(playervehicle));
PlayerTextDrawSetString(playerid, textPlayerVelocimetro[3][playerid], string_velo);
/* Desativado:
format(string_velo, sizeof (string_velo), "%02d Litros", Combustivel[playervehicle]);
PlayerTextDrawSetString(playerid, textPlayerVelocimetro[2][playerid], string_velo);
*/
}
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate) {
if ( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {
ShowPlayerVelocimetro(playerid) ;
} else {
HidePlayerVelocimetro(playerid) ;
}
return 1;
}
stock ShowPlayerVelocimetro(playerid) {
if ( PlayerVelocimetro[playerid] ) {
return 0;
}
PlayerTextDrawSetString(playerid, textPlayerVelocimetro[0][playerid], getVehicleName(GetPlayerVehicleID(playerid)));
for( new text; text != 5; text++) TextDrawShowForPlayer(playerid, textVelocimetro[text]);
for( new text; text != 4; text++) PlayerTextDrawShow(playerid, textPlayerVelocimetro[text][playerid]);
PlayerVelocimetro[playerid] = true ;
PlayerVelocimetroTimer[playerid] = SetTimerEx("UpdatePlayerVelocimetro", 100, true, "i", playerid);
return 1;
}
stock HidePlayerVelocimetro(playerid) {
if ( !PlayerVelocimetro[playerid] ) {
return 0;
}
for( new text; text != 5; text++) TextDrawHideForPlayer(playerid, textVelocimetro[text]);
for( new text; text != 4; text++) PlayerTextDrawHide(playerid, textPlayerVelocimetro[text][playerid]);
PlayerVelocimetro[playerid] = false ;
KillTimer(PlayerVelocimetroTimer[playerid]);
return 1;
}
public OnPlayerConnect(playerid) {
PlayerVelocimetro[playerid] = false ;
textPlayerVelocimetro[0][playerid] = CreatePlayerTextDraw(playerid,615.000000, 230.000000, "Nenhum");
PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[0][playerid], 3);
PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[0][playerid], 0);
PlayerTextDrawFont(playerid,textPlayerVelocimetro[0][playerid], 1);
PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[0][playerid], 0.330000, 1.299999);
PlayerTextDrawColor(playerid,textPlayerVelocimetro[0][playerid], -156);
PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[0][playerid], 0);
PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[0][playerid], 1);
PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[0][playerid], 1);
PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[0][playerid], 0);
textPlayerVelocimetro[1][playerid] = CreatePlayerTextDraw(playerid,615.000000, 244.000000, "000 km/h");
PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[1][playerid], 3);
PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[1][playerid], 0);
PlayerTextDrawFont(playerid,textPlayerVelocimetro[1][playerid], 2);
PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[1][playerid], 0.250000, 1.299999);
PlayerTextDrawColor(playerid,textPlayerVelocimetro[1][playerid], -156);
PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[1][playerid], 0);
PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[1][playerid], 1);
PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[1][playerid], 1);
PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[1][playerid], 0);
textPlayerVelocimetro[2][playerid] = CreatePlayerTextDraw(playerid,615.000000, 258.000000, "0 litros");
PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[2][playerid], 3);
PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[2][playerid], 0);
PlayerTextDrawFont(playerid,textPlayerVelocimetro[2][playerid], 2);
PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[2][playerid], 0.250000, 1.299999);
PlayerTextDrawColor(playerid,textPlayerVelocimetro[2][playerid], -156);
PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[2][playerid], 0);
PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[2][playerid], 1);
PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[2][playerid], 1);
PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[2][playerid], 0);
textPlayerVelocimetro[3][playerid] = CreatePlayerTextDraw(playerid,615.000000, 272.000000, "0%");
PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[3][playerid], 3);
PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[3][playerid], 0);
PlayerTextDrawFont(playerid,textPlayerVelocimetro[3][playerid], 2);
PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[3][playerid], 0.250000, 1.299999);
PlayerTextDrawColor(playerid,textPlayerVelocimetro[3][playerid], -156);
PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[3][playerid], 0);
PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[3][playerid], 1);
PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[3][playerid], 1);
PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[3][playerid], 0);
return 1;
}
public OnPlayerDisconnect(playerid) {
if (PlayerVelocimetro[playerid]) {
KillTimer(PlayerVelocimetroTimer[playerid]);
}
return 1;
}
public OnFilterScriptInit() {
textVelocimetro[0] = TextDrawCreate(379.000000, 223.000000, "i");
TextDrawBackgroundColor(textVelocimetro[0], 0);
TextDrawFont(textVelocimetro[0], 2);
TextDrawLetterSize(textVelocimetro[0], 28.800073, 2.600000);
TextDrawColor(textVelocimetro[0], 80);
TextDrawSetOutline(textVelocimetro[0], 0);
TextDrawSetProportional(textVelocimetro[0], 1);
TextDrawSetShadow(textVelocimetro[0], 1);
TextDrawSetSelectable(textVelocimetro[0], 0);
textVelocimetro[1] = TextDrawCreate(379.000000, 237.000000, "i");
TextDrawBackgroundColor(textVelocimetro[1], 0);
TextDrawFont(textVelocimetro[1], 2);
TextDrawLetterSize(textVelocimetro[1], 28.800073, 2.600000);
TextDrawColor(textVelocimetro[1], 80);
TextDrawSetOutline(textVelocimetro[1], 0);
TextDrawSetProportional(textVelocimetro[1], 1);
TextDrawSetShadow(textVelocimetro[1], 1);
TextDrawSetSelectable(textVelocimetro[1], 0);
textVelocimetro[2] = TextDrawCreate(379.000000, 251.000000, "i");
TextDrawBackgroundColor(textVelocimetro[2], 0);
TextDrawFont(textVelocimetro[2], 2);
TextDrawLetterSize(textVelocimetro[2], 28.800073, 2.600000);
TextDrawColor(textVelocimetro[2], 80);
TextDrawSetOutline(textVelocimetro[2], 0);
TextDrawSetProportional(textVelocimetro[2], 1);
TextDrawSetShadow(textVelocimetro[2], 1);
TextDrawSetSelectable(textVelocimetro[2], 0);
textVelocimetro[3] = TextDrawCreate(379.000000, 265.000000, "i");
TextDrawBackgroundColor(textVelocimetro[3], 0);
TextDrawFont(textVelocimetro[3], 2);
TextDrawLetterSize(textVelocimetro[3], 28.800073, 2.600000);
TextDrawColor(textVelocimetro[3], 80);
TextDrawSetOutline(textVelocimetro[3], 0);
TextDrawSetProportional(textVelocimetro[3], 1);
TextDrawSetShadow(textVelocimetro[3], 1);
TextDrawSetSelectable(textVelocimetro[3], 0);
textVelocimetro[4] = TextDrawCreate(531.000000, 230.000000, "Carro~n~~n~Velocidade~n~~n~Combustivel~n~~n~Lataria");
TextDrawAlignment(textVelocimetro[4], 3);
TextDrawBackgroundColor(textVelocimetro[4], 0);
TextDrawFont(textVelocimetro[4], 2);
TextDrawLetterSize(textVelocimetro[4], 0.210000, 0.799999);
TextDrawColor(textVelocimetro[4], -186);
TextDrawSetOutline(textVelocimetro[4], 0);
TextDrawSetProportional(textVelocimetro[4], 1);
TextDrawSetShadow(textVelocimetro[4], 1);
TextDrawSetSelectable(textVelocimetro[4], 0);
print("*****************************");
print("*** Velocimetro carregado ***");
print("*****************************");
return 1;
}
new VehicleNames[212][] =
{
{"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},
{"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},
{"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},
{"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},
{"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},
{"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
{"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},
{"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},
{"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},
{"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
{"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
{"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},
{"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},
{"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},
{"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},
{"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},
{"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},
{"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},
{"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
{"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},
{"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},
{"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},
{"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},
{"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
{"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
{"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
{"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
{"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
{"Utility Trailer"}
};
stock getVehicleName(vehicleid){
new vehmodel = GetVehicleModel(vehicleid);
new nameVeh[75];
if (vehmodel < 400 || vehmodel > 611) {
strcat(nameVeh, "Nenhum");
return nameVeh;
}
strcat(nameVeh, VehicleNames[vehmodel - 400]);
return nameVeh;
}
stock GetVehicleSpeed(vehicleid)
{
new Float:xPos[3];
GetVehicleVelocity(vehicleid, xPos[0], xPos[1], xPos[2]);
return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);
}
forward UpdatePlayerVelocimetro(playerid);
/*O sistema de gasolina está desativado, caso queira adaptar para seu gamemode, basta trocar essa parte:
//Desativado:
format(string_velo, sizeof (string_velo), "%02d Litros", Combustivel[playervehicle]);
PlayerTextDrawSetString(playerid, textPlayerVelocimetro[2][playerid], string_velo);
Trocando o nome da variável Combustivel para a sua.*/
//Todos os direitos reservados a otaviotm pela criação do filterscript.
+3
xVinixx
Rafa_KiwZ
otaviotm
7 participantes
Velocimetro estilo GTA V
otaviotm- --> Postador Iniciante
- Steam : otaviotm18
Zello : Scripter - Mapper - SAMP
Mensagens : 41
Moedas : 2603
Data de inscrição : 22/12/2017
Idade : 24
Localização : MG
- Mensagem nº1
Velocimetro estilo GTA V
Meu Servidor no Discord : [url=https://discord.gg/bhfZWCs2md]Acesse[/url]
Meu Canal No Youtube : [url=https://www.youtube.com/@OTAVIOTM]Acesse[/url]
Rafa_KiwZ- --> Postador Iniciante
- Celular : 933422132
Mensagens : 22
Moedas : 2565
Data de inscrição : 02/01/2018
Idade : 23
- Mensagem nº2
Re: Velocimetro estilo GTA V
Print tem??
xVinixx- --> Postador Iniciante
- Celular : 991529210
Mensagens : 18
Moedas : 3444
Data de inscrição : 02/08/2015
Idade : 22
Localização : São Paulo
- Mensagem nº3
Re: Velocimetro estilo GTA V
Coloque prints e os creditos do autor pls!
Contente- --> Postador Médio
- Zello : SSGamers
Celular : 19989073998
Mensagens : 358
Moedas : 3170
Data de inscrição : 19/02/2018
Idade : 23
Localização : Brasil/Sp
- Mensagem nº4
Re: Velocimetro estilo GTA V
- Código:
[center]/*[/center]
[center] Velocimetro estilo GTA V[/center]
[center] by: ForT ou dimmy_scarface[/center]
[center] 17/07/2015[/center]
[center]*/[/center]
[center][/center]
[center]#include <a_samp>[/center]
[center][/center]
[center]// (Global Textdraws velocimetro)[/center]
[center]new Text:textVelocimetro[5];[/center]
[center][/center]
[center]// (Player Textdraws velocimetro)[/center]
[center]new PlayerText:textPlayerVelocimetro[4][MAX_PLAYERS];[/center]
[center][/center]
[center]// (Vendo o velocimetro ou não)[/center]
[center]new bool:PlayerVelocimetro[MAX_PLAYERS];[/center]
[center][/center]
[center]// (Timer velocimetro)[/center]
[center]new PlayerVelocimetroTimer[MAX_PLAYERS];[/center]
[center][/center]
[center]stock Float:GetVehicleHealthEx(vehicleid)[/center]
[center]{[/center]
[center] new Float:health;[/center]
[center] GetVehicleHealth(vehicleid, health);[/center]
[center] [/center]
[center] if ( health > 900.0) {[/center]
[center] return health / 10.0;[/center]
[center] }[/center]
[center] else return ( health / 10.0 )-(24);[/center]
[center]}[/center]
[center][/center]
[center]public UpdatePlayerVelocimetro(playerid) {[/center]
[center][/center]
[center] new playervehicle;[/center]
[center][/center]
[center] if ( (playervehicle = GetPlayerVehicleID(playerid)) != INVALID_VEHICLE_ID) {[/center]
[center][/center]
[center] new string_velo[15];[/center]
[center][/center]
[center] format(string_velo, sizeof (string_velo), "%02d km/h", GetVehicleSpeed(playervehicle));[/center]
[center] PlayerTextDrawSetString(playerid, textPlayerVelocimetro[1][playerid], string_velo);[/center]
[center][/center]
[center] format(string_velo, sizeof (string_velo), "%.0f%", GetVehicleHealthEx(playervehicle));[/center]
[center] PlayerTextDrawSetString(playerid, textPlayerVelocimetro[3][playerid], string_velo);[/center]
[center] [/center]
[center] /* Desativado:[/center]
[center] format(string_velo, sizeof (string_velo), "%02d Litros", Combustivel[playervehicle]);[/center]
[center] PlayerTextDrawSetString(playerid, textPlayerVelocimetro[2][playerid], string_velo);[/center]
[center] */[/center]
[center] }[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]public OnPlayerStateChange(playerid, newstate, oldstate) {[/center]
[center][/center]
[center] if ( newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) {[/center]
[center] ShowPlayerVelocimetro(playerid) ;[/center]
[center] } else {[/center]
[center] HidePlayerVelocimetro(playerid) ;[/center]
[center] }[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]stock ShowPlayerVelocimetro(playerid) {[/center]
[center] if ( PlayerVelocimetro[playerid] ) {[/center]
[center] return 0;[/center]
[center] }[/center]
[center] [/center]
[center] PlayerTextDrawSetString(playerid, textPlayerVelocimetro[0][playerid], getVehicleName(GetPlayerVehicleID(playerid)));[/center]
[center] [/center]
[center] for( new text; text != 5; text++) TextDrawShowForPlayer(playerid, textVelocimetro[text]);[/center]
[center] for( new text; text != 4; text++) PlayerTextDrawShow(playerid, textPlayerVelocimetro[text][playerid]);[/center]
[center] PlayerVelocimetro[playerid] = true ;[/center]
[center] PlayerVelocimetroTimer[playerid] = SetTimerEx("UpdatePlayerVelocimetro", 100, true, "i", playerid);[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]stock HidePlayerVelocimetro(playerid) {[/center]
[center] if ( !PlayerVelocimetro[playerid] ) {[/center]
[center] return 0;[/center]
[center] }[/center]
[center] for( new text; text != 5; text++) TextDrawHideForPlayer(playerid, textVelocimetro[text]);[/center]
[center] for( new text; text != 4; text++) PlayerTextDrawHide(playerid, textPlayerVelocimetro[text][playerid]);[/center]
[center] PlayerVelocimetro[playerid] = false ;[/center]
[center] KillTimer(PlayerVelocimetroTimer[playerid]);[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]public OnPlayerConnect(playerid) {[/center]
[center][/center]
[center] PlayerVelocimetro[playerid] = false ;[/center]
[center][/center]
[center] textPlayerVelocimetro[0][playerid] = CreatePlayerTextDraw(playerid,615.000000, 385.000000, "Nenhum");[/center]
[center] PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[0][playerid], 3);[/center]
[center] PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[0][playerid], 0);[/center]
[center] PlayerTextDrawFont(playerid,textPlayerVelocimetro[0][playerid], 1);[/center]
[center] PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[0][playerid], 0.330000, 1.299999);[/center]
[center] PlayerTextDrawColor(playerid,textPlayerVelocimetro[0][playerid], -156);[/center]
[center] PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[0][playerid], 0);[/center]
[center] PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[0][playerid], 1);[/center]
[center] PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[0][playerid], 1);[/center]
[center] PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[0][playerid], 0);[/center]
[center][/center]
[center] textPlayerVelocimetro[1][playerid] = CreatePlayerTextDraw(playerid,615.000000, 399.000000, "000 km/h");[/center]
[center] PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[1][playerid], 3);[/center]
[center] PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[1][playerid], 0);[/center]
[center] PlayerTextDrawFont(playerid,textPlayerVelocimetro[1][playerid], 2);[/center]
[center] PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[1][playerid], 0.250000, 1.299999);[/center]
[center] PlayerTextDrawColor(playerid,textPlayerVelocimetro[1][playerid], -156);[/center]
[center] PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[1][playerid], 0);[/center]
[center] PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[1][playerid], 1);[/center]
[center] PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[1][playerid], 1);[/center]
[center] PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[1][playerid], 0);[/center]
[center][/center]
[center] textPlayerVelocimetro[2][playerid] = CreatePlayerTextDraw(playerid,615.000000, 413.000000, "0 litros");[/center]
[center] PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[2][playerid], 3);[/center]
[center] PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[2][playerid], 0);[/center]
[center] PlayerTextDrawFont(playerid,textPlayerVelocimetro[2][playerid], 2);[/center]
[center] PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[2][playerid], 0.250000, 1.299999);[/center]
[center] PlayerTextDrawColor(playerid,textPlayerVelocimetro[2][playerid], -156);[/center]
[center] PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[2][playerid], 0);[/center]
[center] PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[2][playerid], 1);[/center]
[center] PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[2][playerid], 1);[/center]
[center] PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[2][playerid], 0);[/center]
[center][/center]
[center] textPlayerVelocimetro[3][playerid] = CreatePlayerTextDraw(playerid,615.000000, 427.000000, "0%");[/center]
[center] PlayerTextDrawAlignment(playerid,textPlayerVelocimetro[3][playerid], 3);[/center]
[center] PlayerTextDrawBackgroundColor(playerid,textPlayerVelocimetro[3][playerid], 0);[/center]
[center] PlayerTextDrawFont(playerid,textPlayerVelocimetro[3][playerid], 2);[/center]
[center] PlayerTextDrawLetterSize(playerid,textPlayerVelocimetro[3][playerid], 0.250000, 1.299999);[/center]
[center] PlayerTextDrawColor(playerid,textPlayerVelocimetro[3][playerid], -156);[/center]
[center] PlayerTextDrawSetOutline(playerid,textPlayerVelocimetro[3][playerid], 0);[/center]
[center] PlayerTextDrawSetProportional(playerid,textPlayerVelocimetro[3][playerid], 1);[/center]
[center] PlayerTextDrawSetShadow(playerid,textPlayerVelocimetro[3][playerid], 1);[/center]
[center] PlayerTextDrawSetSelectable(playerid,textPlayerVelocimetro[3][playerid], 0);[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]public OnPlayerDisconnect(playerid) {[/center]
[center][/center]
[center] if (PlayerVelocimetro[playerid]) {[/center]
[center] KillTimer(PlayerVelocimetroTimer[playerid]);[/center]
[center] }[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]public OnFilterScriptInit() {[/center]
[center][/center]
[center] textVelocimetro[0] = TextDrawCreate(379.000000, 378.000000, "i");[/center]
[center] TextDrawBackgroundColor(textVelocimetro[0], 0);[/center]
[center] TextDrawFont(textVelocimetro[0], 2);[/center]
[center] TextDrawLetterSize(textVelocimetro[0], 28.800073, 2.600000);[/center]
[center] TextDrawColor(textVelocimetro[0], 80);[/center]
[center] TextDrawSetOutline(textVelocimetro[0], 0);[/center]
[center] TextDrawSetProportional(textVelocimetro[0], 1);[/center]
[center] TextDrawSetShadow(textVelocimetro[0], 1);[/center]
[center] TextDrawSetSelectable(textVelocimetro[0], 0);[/center]
[center][/center]
[center] textVelocimetro[1] = TextDrawCreate(379.000000, 392.000000, "i");[/center]
[center] TextDrawBackgroundColor(textVelocimetro[1], 0);[/center]
[center] TextDrawFont(textVelocimetro[1], 2);[/center]
[center] TextDrawLetterSize(textVelocimetro[1], 28.800073, 2.600000);[/center]
[center] TextDrawColor(textVelocimetro[1], 80);[/center]
[center] TextDrawSetOutline(textVelocimetro[1], 0);[/center]
[center] TextDrawSetProportional(textVelocimetro[1], 1);[/center]
[center] TextDrawSetShadow(textVelocimetro[1], 1);[/center]
[center] TextDrawSetSelectable(textVelocimetro[1], 0);[/center]
[center][/center]
[center] textVelocimetro[2] = TextDrawCreate(379.000000, 406.000000, "i");[/center]
[center] TextDrawBackgroundColor(textVelocimetro[2], 0);[/center]
[center] TextDrawFont(textVelocimetro[2], 2);[/center]
[center] TextDrawLetterSize(textVelocimetro[2], 28.800073, 2.600000);[/center]
[center] TextDrawColor(textVelocimetro[2], 80);[/center]
[center] TextDrawSetOutline(textVelocimetro[2], 0);[/center]
[center] TextDrawSetProportional(textVelocimetro[2], 1);[/center]
[center] TextDrawSetShadow(textVelocimetro[2], 1);[/center]
[center] TextDrawSetSelectable(textVelocimetro[2], 0);[/center]
[center][/center]
[center] textVelocimetro[3] = TextDrawCreate(379.000000, 420.000000, "i");[/center]
[center] TextDrawBackgroundColor(textVelocimetro[3], 0);[/center]
[center] TextDrawFont(textVelocimetro[3], 2);[/center]
[center] TextDrawLetterSize(textVelocimetro[3], 28.800073, 2.600000);[/center]
[center] TextDrawColor(textVelocimetro[3], 80);[/center]
[center] TextDrawSetOutline(textVelocimetro[3], 0);[/center]
[center] TextDrawSetProportional(textVelocimetro[3], 1);[/center]
[center] TextDrawSetShadow(textVelocimetro[3], 1);[/center]
[center] TextDrawSetSelectable(textVelocimetro[3], 0);[/center]
[center][/center]
[center] textVelocimetro[4] = TextDrawCreate(531.000000, 387.000000, "Carro~n~~n~Velocidade~n~~n~Combustivel~n~~n~Lataria");[/center]
[center] TextDrawAlignment(textVelocimetro[4], 3);[/center]
[center] TextDrawBackgroundColor(textVelocimetro[4], 0);[/center]
[center] TextDrawFont(textVelocimetro[4], 2);[/center]
[center] TextDrawLetterSize(textVelocimetro[4], 0.210000, 0.799999);[/center]
[center] TextDrawColor(textVelocimetro[4], -186);[/center]
[center] TextDrawSetOutline(textVelocimetro[4], 0);[/center]
[center] TextDrawSetProportional(textVelocimetro[4], 1);[/center]
[center] TextDrawSetShadow(textVelocimetro[4], 1);[/center]
[center] TextDrawSetSelectable(textVelocimetro[4], 0);[/center]
[center] [/center]
[center] print("*****************************");[/center]
[center] print("*** Velocimetro carregado ***");[/center]
[center] print("*****************************");[/center]
[center] return 1;[/center]
[center]}[/center]
[center][/center]
[center]new VehicleNames[212][] =[/center]
[center]{[/center]
[center] {"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},[/center]
[center] {"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},[/center]
[center] {"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},[/center]
[center] {"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},[/center]
[center] {"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},[/center]
[center] {"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},[/center]
[center] {"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},[/center]
[center] {"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},[/center]
[center] {"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},[/center]
[center] {"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},[/center]
[center] {"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},[/center]
[center] {"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},[/center]
[center] {"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},[/center]
[center] {"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},[/center]
[center] {"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},[/center]
[center] {"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},[/center]
[center] {"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},[/center]
[center] {"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},[/center]
[center] {"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},[/center]
[center] {"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},[/center]
[center] {"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},[/center]
[center] {"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},[/center]
[center] {"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},[/center]
[center] {"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},[/center]
[center] {"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},[/center]
[center] {"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},[/center]
[center] {"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},[/center]
[center] {"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},[/center]
[center] {"Utility Trailer"}[/center]
[center]};[/center]
[center][/center]
[center]stock getVehicleName(vehicleid){[/center]
[center] new vehmodel = GetVehicleModel(vehicleid);[/center]
[center] new nameVeh[75];[/center]
[center][/center]
[center] if (vehmodel < 400 || vehmodel > 611) {[/center]
[center] strcat(nameVeh, "Nenhum");[/center]
[center] return nameVeh;[/center]
[center] }[/center]
[center] strcat(nameVeh, VehicleNames[vehmodel - 400]);[/center]
[center] return nameVeh;[/center]
[center]}[/center]
[center][/center]
[center]stock GetVehicleSpeed(vehicleid)[/center]
[center]{[/center]
[center] new Float:xPos[3];[/center]
[center] GetVehicleVelocity(vehicleid, xPos[0], xPos[1], xPos[2]);[/center]
[center] return floatround(floatsqroot(xPos[0] * xPos[0] + xPos[1] * xPos[1] + xPos[2] * xPos[2]) * 170.00);[/center]
[center]}[/center]
[center][/center]
[center]forward UpdatePlayerVelocimetro(playerid);[/center]
Codigo Original dos próprios criadores do filterscript ATT> by: ForT ou dimmy_scarface
Prints:
Atenciosamente exCoordenador SSGamers Brasil
Respeite o Regulamento e os Usuários.
Evitem serem Punidos por não lerem o regulamento
Rowan- --> Postador Iniciante
- Steam : Scripter-Profissional | Mapper iniciante
Zello : no tengo
Celular : 5564999396333
Mensagens : 159
Moedas : 2848
Data de inscrição : 06/01/2018
Idade : 21
Localização : Los Santos
- Mensagem nº5
Re: Velocimetro estilo GTA V
é bem fd esse velocimetro
Theus_Crazzy- --> Postador Iniciante
- Mensagens : 88
Moedas : 4659
Data de inscrição : 24/08/2012
- Mensagem nº6
Re: Velocimetro estilo GTA V
by: dimmy_scarface (ForT no fórum oficial do samp)
Stremmer_Scripter#0961- --> Postador Fanático
- Celular : 17981120325
Mensagens : 681
Moedas : 3207
Data de inscrição : 19/10/2019
Idade : 29
- Mensagem nº7
Re: Velocimetro estilo GTA V
tem atualizacao ??