SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese > Lançamentos/Releases

Reply
 
Thread Tools Display Modes
Old 29/11/2011, 12:12 AM   #1
dPlaYer_
High-roller
 
dPlaYer_'s Avatar
 
Join Date: Jul 2011
Location: Salvador
Posts: 1,739
Reputation: 179
Wink Velocimetro Basico

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

Pastebin
pawn Code:
#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
__________________

Last edited by dPlaYer_; 01/12/2011 at 01:58 AM.
dPlaYer_ is offline   Reply With Quote
Old 29/11/2011, 12:17 AM   #2
DrTHE
High-roller
 
DrTHE's Avatar
 
Join Date: Feb 2011
Location: Belo Horizonte, Brazil
Posts: 1,155
Reputation: 150
Default Re: Velocimetro Basico

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

abraço negona!!! -q
__________________


Brazucas'Server - MG/RPG


Site Fórum
Brazucas'RPG VIII lançada.
Brazucas Arcade developer.
DrTHE is offline   Reply With Quote
Old 29/11/2011, 12:20 AM   #3
dPlaYer_
High-roller
 
dPlaYer_'s Avatar
 
Join Date: Jul 2011
Location: Salvador
Posts: 1,739
Reputation: 179
Default Re: Velocimetro Basico

Negona é a pqp /\ ¬¬
__________________
dPlaYer_ is offline   Reply With Quote
Old 29/11/2011, 12:28 AM   #4
DreeH
Huge Clucker
 
DreeH's Avatar
 
Join Date: May 2011
Posts: 325
Reputation: 25
Default Re: Velocimetro Basico

4/10.

Muito simples, e falhou -MUITO- na identação do CODE, fora isso, até da pra usar.
__________________
,
DreeH is offline   Reply With Quote
Old 29/11/2011, 12:36 AM   #5
dPlaYer_
High-roller
 
dPlaYer_'s Avatar
 
Join Date: Jul 2011
Location: Salvador
Posts: 1,739
Reputation: 179
Default Re: Velocimetro Basico

Quote:
Originally Posted by DreeH View Post
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 :/
__________________
dPlaYer_ is offline   Reply With Quote
Old 29/11/2011, 12:44 AM   #6
nX_
Huge Clucker
 
nX_'s Avatar
 
Join Date: Sep 2011
Location: Sistema estelar binario Zeta II da constelação Reticuli
Posts: 472
Reputation: 116
Default Re: Velocimetro Basico

é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!
__________________
nX_ is offline   Reply With Quote
Old 29/11/2011, 12:45 AM   #7
dPlaYer_
High-roller
 
dPlaYer_'s Avatar
 
Join Date: Jul 2011
Location: Salvador
Posts: 1,739
Reputation: 179
Default Re: Velocimetro Basico

Quote:
Originally Posted by Slim.- View Post
é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
__________________
dPlaYer_ is offline   Reply With Quote
Old 29/11/2011, 01:04 AM   #8
Vai_Besta
Gangsta
 
Vai_Besta's Avatar
 
Join Date: Dec 2009
Location: localhost
Posts: 562
Reputation: 22
Default Re: Velocimetro Basico

não gostei, essa é minha opnião
__________________

By Shelby
Vai_Besta is offline   Reply With Quote
Old 29/11/2011, 01:13 AM   #9
Blacknot
Big Clucker
 
Blacknot's Avatar
 
Join Date: Jul 2011
Location: Num Lugar
Posts: 59
Reputation: 0
Default Re: Velocimetro Basico

Quote:
Originally Posted by Slim.- View Post
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
Blacknot is offline   Reply With Quote
Old 29/11/2011, 01:16 AM   #10
nX_
Huge Clucker
 
nX_'s Avatar
 
Join Date: Sep 2011
Location: Sistema estelar binario Zeta II da constelação Reticuli
Posts: 472
Reputation: 116
Default Re: Velocimetro Basico

Quote:
Originally Posted by Blacknot View Post
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!
__________________
nX_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Sistema de VIP [Basico] [FeK]Knife Lançamentos/Releases 17 22/04/2014 08:40 PM
[Ajuda] Criando TDM básico Jason_King Português/Portuguese 11 08/09/2011 12:46 AM
[Ajuda] Algo básico! SlinghShoot Português/Portuguese 8 23/08/2011 10:08 PM
Errinho Basico ReDKiiL Português/Portuguese 2 27/04/2011 01:36 AM


All times are GMT. The time now is 06:56 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.