[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


Messages In This Thread
Velocimetro Basico - by dPlaYer_ - 28.11.2011, 23:12
Re: Velocimetro Basico - by DrTHE - 28.11.2011, 23:17
Re: Velocimetro Basico - by dPlaYer_ - 28.11.2011, 23:20
Re: Velocimetro Basico - by DreeH - 28.11.2011, 23:28
Re: Velocimetro Basico - by dPlaYer_ - 28.11.2011, 23:36
Re: Velocimetro Basico - by nX_ - 28.11.2011, 23:44
Re: Velocimetro Basico - by dPlaYer_ - 28.11.2011, 23:45
Re: Velocimetro Basico - by Vai_Besta - 29.11.2011, 00:04
Re: Velocimetro Basico - by Blacknot - 29.11.2011, 00:13
Re: Velocimetro Basico - by nX_ - 29.11.2011, 00:16

Forum Jump:


Users browsing this thread: 1 Guest(s)