[FilterScript] Velocimetro Basico
#1

Eae galera do samp, vim aqui postar um fs de velocimetro ( basico )
Nгo tinha nada pra fazer ai fiz esse fs.

Pastebin
pawn Код:
#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;
}
Screen's Shots:
http://imageshack.us/g/442/samp005tv.png/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ou Entao \/ ._.
http://imageshack.us/photo/my-images/442/samp005tv.png/
http://imageshack.us/photo/my-images...amp006xqz.png/
http://imageshack.us/photo/my-images...amp007zyd.png/
http://imageshack.us/photo/my-images/9/samp008tp.png/
http://imageshack.us/photo/my-images/685/samp009yf.png/
http://imageshack.us/photo/my-images/405/samp010cb.png/

Video:
[ame]http://www.youtube.com/watch?v=dDzWgqQSgAE[/ame]

Veio falar merda? melhor nem postar.
Creditos: [LF]PlaYer
Littl3j0hNy - [ Nome dos Veiculos ]
StrondA_ - Identaзгo
The_fallen
Reply
#2

legal, voce poderia ter usado outra fonte ia fikar mais lindim

abraзo negona!!! -q
Reply
#3

Negona й a pqp /\ ¬¬
Reply
#4

4/10.

Muito simples, e falhou -MUITO- na identaзгo do CODE, fora isso, atй da pra usar.
Reply
#5

Quote:
Originally Posted by DreeH
Посмотреть сообщение
4/10.

Muito simples, e falhou -MUITO- na identaзгo do CODE, fora isso, atй da pra usar.
sim eu sei , mas й q eu fiz nas pressas :/
Reply
#6

й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!
Reply
#7

Quote:
Originally Posted by Slim.-
Посмотреть сообщение
й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!
kkkkkkkkkkkkkkkk
@@
Dps mudo hj to de saida amanha 3 prova aaaaaaaaaaaaaa'

@@
Rox! xD
Reply
#8

nгo gostei, essa й minha opniгo
Reply
#9

Quote:
Originally Posted by Slim.-
Посмотреть сообщение
tem como mudar a cor das letras tipo cores bem chamativas ?
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
Reply
#10

Quote:
Originally Posted by Blacknot
Посмотреть сообщение
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
mas deichar colorido foi uma opiniгo --' cores vivas nгo essas ai!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)