#include <a_samp>
new Text:velo[MAX_PLAYERS];
forward Velocimetro();
new NomeCarro[212][] =
{
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel", "Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana",
"Infernus", "Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto", "Taxi", "Washington", "Bobcat",
"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", "Cropduster","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", "Dune", "Sweeper", "Broadway",
"Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros", "Hotdog",
"Club", "Freight Carriage", "Trailer 4", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car (LSPD)", "Police Car (SFPD)",
"Police Car (LVPD)", "Police Ranger", "Picador", "S.W.A.T", "Alpha", "Phoenix", "Glendale", "Sadler", "Luggage Trailer A",
"Luggage Trailer B", "Stairs", "BoxVille", "Tiller", "Utility Trailer"
};
public OnGameModeInit()
{
print("\n--------------------------------------");
print(" Simples Velocimetro by: [LF]PlaYer");
print("--------------------------------------\n");
SetTimer("Velocimetro", 500, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
velo[playerid] = TextDrawCreate(212, 377,"~g~Velocidade:0Km/h");
TextDrawTextSize(velo[playerid], 470, 510);
TextDrawColor(velo[playerid], 160);
TextDrawUseBox(velo[playerid], 1);
TextDrawSetShadow(velo[playerid], 0);
TextDrawBoxColor(velo[playerid], 0);
TextDrawSetOutline(velo[playerid], 1);
TextDrawFont(velo[playerid], 1);
TextDrawSetProportional(velo[playerid], 1);
TextDrawHideForPlayer(playerid, velo[playerid]);
return true;
}
public Velocimetro()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(i, aname, MAX_PLAYER_NAME);
if(IsPlayerInAnyVehicle(i))
{
new Float:X, Float:Y, Float:Z, Float:Speed;
GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 200.0);
new Float:vcarro;
GetVehicleHealth(GetPlayerVehicleID(i), vcarro);
new velocidade;
velocidade = floatround(Speed, floatround_floor);
new string[128];
new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i));
PlayerVehicleModelID -= 400;
new nocarro[30];
format(nocarro,30,NomeCarro[PlayerVehicleModelID]);
format(string, 128,"~g~Veiculo:~w~%s~n~~g~Velocidade:~w~%i ~b~KM/H~n~~g~Lataria:~w~%.0f%",nocarro,velocidade,vcarro);
TextDrawSetString(velo[i], string);
TextDrawShowForPlayer(i, velo[i]);
}
else TextDrawHideForPlayer(i, velo[i]);
}
else
{
TextDrawHideForPlayer(i, velo[i]);
}
}
return true;
}
4/10.
Muito simples, e falhou -MUITO- na identaзгo do CODE, fora isso, atй da pra usar. |
йe vou te chamar de Player que e mais faзil
gostei bem moderninho eim! tem como mudar a cor das letras tipo cores bem chamativas ? o objeto em cima da cabeзa ficou epico kkkkkkkkk! |
Simples Man
Codigos : ~n~ Pula Linha ~w~ Branco ~b~ Azul Escuro ~g~ Amarelo ~r~ Vermelho ~p~ Roxo Claro Pra Modificar a Cor e Simples Tmb ^^ public Velocimetro() [~g~]Veiculo:[~w~]%s[ ~n~ ] [COR] [COR] [Pula Linha] Velocidade:[~w~]%i[~b~]KM/H [COR] [COR] [~g~]Lataria:[~w~]%.0f%",nocarro,velocidade,vcarro); [COR] [COR] Se Localiza Akii public Velocimetro() { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new aname[MAX_PLAYER_NAME]; GetPlayerName(i, aname, MAX_PLAYER_NAME); if(IsPlayerInAnyVehicle(i)) { new Float:X, Float:Y, Float:Z, Float:Speed; GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z); Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower( X, 2), floatpower(Y, 2)), floatpower(Z, 2))), 200.0); new Float:vcarro; GetVehicleHealth(GetPlayerVehicleID(i), vcarro); new velocidade; velocidade = floatround(Speed, floatround_floor); new string[256]; new PlayerVehicleModelID = GetVehicleModel(GetPlayerVehicleID(i)); PlayerVehicleModelID -= 400; new nocarro[30]; format(nocarro,30,NomeCarro[PlayerVehicleModelID]); format(string, 256,"~g~Veiculo:~w~%s~n~~g~Velocidade:~w~%i ~b~KM/H~n~~g~Lataria:~w~%.0f%",nocarro,velocidade,vcarro ); // AKI BOY ^^ TextDrawSetString(velo[i],string); TextDrawShowForPlayer(i,velo[i]); } else TextDrawHideForPlayer(i, velo[i]); }else{ TextDrawHideForPlayer(i, velo[i]); } } } Qualqer Duvida So postar |