[Ajuda]Velocimetro a milhгo!
#1

Eae, eu vim aqui para lhe falar o velocimetro que ta a a milhao;

ve ai essas Йssi Йssi:

Obs:

Parado velocimetro marca 7000km/h, meio rapido para um rpg, nгo?

Minha meta foi 8000km/h, ja penso se o fs de radar o preзo da multa foзe por velocidade?Nгo й bom nem pensar.


Imagens
Reply
#2

posta o fs ke c usa
Reply
#3

Nгo uso Filter Script.Este velocimetro, vem introduzido no gamemode Thug.
Reply
#4

Explicaзгo para todos erros : THUG
Reply
#5

¬¬' eu usava normal!Mas agora ja deu certo *-*! esse gm nem й meu '-' agora arrumei
Reply
#6

Roginho vc pode posta o velocimetro em ja q nao e fs
to doido pra acha um velo em cmd e nao em fs pois da muito bug
Reply
#7

Ok;

Ai vai:
pawn Код:
No inicio:
forward AtualizarVeloVictor(playerid);
new Text:box[MAX_PLAYERS],Text:tacho[MAX_PLAYERS],Text:fahrzeug[MAX_PLAYERS],Text:kmh[MAX_PLAYERS];
new Text:hoehe[MAX_PLAYERS],Text:zustand[MAX_PLAYERS];
new SpeedoON[MAX_PLAYERS];
//========================================================================
//Em OnGameMode Init
SetTimer("AtualizarVeloVictor",1000, 1);
//=============================================================================
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        box[i] = TextDrawCreate(198.000000,396.000000,"_");
        TextDrawUseBox(box[i],1);
        TextDrawBoxColor(box[i],0x00000066);
        TextDrawTextSize(box[i],438.000000,0.000000);
        TextDrawAlignment(box[i],0);
        TextDrawBackgroundColor(box[i],0x00000033);
        TextDrawFont(box[i],3);
        TextDrawLetterSize(box[i],1.000000,4.000000);
        TextDrawColor(box[i],0xffffffff);
        TextDrawSetOutline(box[i],1);
        TextDrawSetProportional(box[i],1);
        TextDrawSetShadow(box[i],1);

        /*tacho[i] = TextDrawCreate(288.000000,380.000000,"Velocimetro");
        TextDrawUseBox(tacho[i],1);
        TextDrawBoxColor(tacho[i],0x00000066);
        TextDrawTextSize(tacho[i],343.000000,67.000000);
        TextDrawAlignment(tacho[i],0);
        TextDrawBackgroundColor(tacho[i],0x000000ff);
        TextDrawFont(tacho[i],2);
        TextDrawLetterSize(tacho[i],0.399999,1.400000);
        TextDrawColor(tacho[i],0xffffffff);
        TextDrawSetOutline(tacho[i],1);
        TextDrawSetProportional(tacho[i],1);
        TextDrawSetShadow(tacho[i],1);*/


        fahrzeug[i] = TextDrawCreate(198.000000,396.000000," ");
        TextDrawAlignment(fahrzeug[i],0);
        TextDrawBackgroundColor(fahrzeug[i],0x000000ff);
        TextDrawFont(fahrzeug[i],1);
        TextDrawLetterSize(fahrzeug[i],0.299999,1.000000);
        TextDrawColor(fahrzeug[i],0xffffffff);
        TextDrawSetOutline(fahrzeug[i],1);
        TextDrawSetProportional(fahrzeug[i],1);
        TextDrawSetShadow(fahrzeug[i],1);

        kmh[i] = TextDrawCreate(345.000000,396.000000," ");
        TextDrawAlignment(kmh[i],0);
        TextDrawBackgroundColor(kmh[i],0x000000ff);
        TextDrawFont(kmh[i],1);
        TextDrawLetterSize(kmh[i],0.299999,1.000000);
        TextDrawColor(kmh[i],0xffffffff);
        TextDrawSetOutline(kmh[i],1);
        TextDrawSetProportional(kmh[i],1);
        TextDrawSetShadow(kmh[i],1);

        hoehe[i] = TextDrawCreate(199.000000,408.000000," ");
        TextDrawAlignment(hoehe[i],0);
        TextDrawBackgroundColor(hoehe[i],0x000000ff);
        TextDrawFont(hoehe[i],1);
        TextDrawLetterSize(hoehe[i],0.299999,1.000000);
        TextDrawColor(hoehe[i],0xffffffff);
        TextDrawSetOutline(hoehe[i],1);
        TextDrawSetProportional(hoehe[i],1);
        TextDrawSetShadow(hoehe[i],1);

        zustand[i] = TextDrawCreate(345.000000,408.000000," ");
        TextDrawAlignment(zustand[i],0);
        TextDrawBackgroundColor(zustand[i],0x000000ff);
        TextDrawFont(zustand[i],1);
        TextDrawLetterSize(zustand[i],0.299999,1.000000);
        TextDrawColor(zustand[i],0xffffffff);
        TextDrawSetOutline(zustand[i],1);
        TextDrawSetProportional(zustand[i],1);
        TextDrawSetShadow(zustand[i],1);
    }
//=============================================================
Em qualquer lugar:

public AtualizarVeloVictor(playerid)
{
    new Float:Speedo_X,Float:Speedo_Y,Float:Speedo_Z;
    new Float:PlayerSpeedDistance,value;
    new Float:Speedo_HP;


    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
        {
            GetPlayerPos(i, Speedo_X, Speedo_Y, Speedo_Z);
            GetPlayerVehicleID(i);
            GetVehicleHealth(GetPlayerVehicleID(i), Speedo_HP);
            PlayerSpeedDistance = floatsqroot(floatpower(floatabs(floatsub(Speedo_X,SavePlayerPosV[i][sX])),2)+floatpower(floatabs(floatsub(Speedo_Y,SavePlayerPosV[i][sY])),2)+floatpower(floatabs(floatsub(Speedo_Z,SavePlayerPosV[i][sZ])),2));
            value = floatround(PlayerSpeedDistance * 5000);
            new vehicle = GetPlayerVehicleID(i);
            new str1[256],str2[256],str3[256],str4[256];
            if(SpeedoON[i] == 0)
            {
                TextDrawShowForPlayer(i, box[i]);
                //TextDrawShowForPlayer(i, tacho[i]);
                TextDrawShowForPlayer(i, fahrzeug[i]);
                TextDrawShowForPlayer(i, kmh[i]);
                TextDrawShowForPlayer(i, hoehe[i]);
                TextDrawShowForPlayer(i, zustand[i]);
                SpeedoON[i] = 1;
            }
            new kmh_anzahl = floatround(value/1600);

            format(str1,sizeof(str1),"Veiculo: ~r~%s",vehName[GetVehicleModel(GetPlayerVehicleID(i))-400]);
            TextDrawSetString(fahrzeug[i], str1);

            if(kmh_anzahl >= 150)
            {
                format(str2,sizeof(str2),"KM/H: ~g~%d",kmh_anzahl);
                TextDrawSetString(kmh[i], str2);
            }
            else if(kmh_anzahl >= 100)
            {
                format(str2,sizeof(str2),"KM/H: ~r~%d",kmh_anzahl);
                TextDrawSetString(kmh[i], str2);
            }
            else if(kmh_anzahl >= 50)
            {
                format(str2,sizeof(str2),"KM/H: ~r~%d",kmh_anzahl);
                TextDrawSetString(kmh[i], str2);
            }
            else
            {
                format(str2,sizeof(str2),"KM/H: ~r~%d",kmh_anzahl);
                TextDrawSetString(kmh[i], str2);
            }

            format(str3,sizeof(str3),"Combustivel: ~r~%d%", Gas[vehicle]);
            TextDrawSetString(hoehe[i], str3);

            if(Speedo_HP >= 551)
            {
                format(str4,sizeof(str4),"Lataria: ~r~%0.0f%%", Speedo_HP/10);
                TextDrawSetString(zustand[i], str4);
            }
            else if(Speedo_HP >= 361)
            {
                format(str4,sizeof(str4),"Lataria: ~r~%0.0f%%", Speedo_HP/10);
                TextDrawSetString(zustand[i], str4);
            }
            else
            {
                format(str4,sizeof(str4),"Lataria: ~r~%0.0f%%", Speedo_HP/10);
                TextDrawSetString(zustand[i], str4);
            }
        }
        SavePlayerPosV[i][sX] = Speedo_X, SavePlayerPosV[i][sY] = Speedo_Y, SavePlayerPosV[i][sZ] = Speedo_Z;
    }
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(!IsPlayerInAnyVehicle(i))
        {
            TextDrawHideForPlayer(i, box[i]); TextDrawHideForPlayer(i, tacho[i]); TextDrawHideForPlayer(i, fahrzeug[i]); TextDrawHideForPlayer(i, kmh[i]);
            TextDrawHideForPlayer(i, hoehe[i]); TextDrawHideForPlayer(i, zustand[i]); TextDrawHideForPlayer(i, forum[i]);
            SpeedoON[i] = 0;
        }
    }
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(spawnado[i] == 1)
            {
                if(SpeedoON[i] == 1)
                {
                }
                if(SpeedoON[i] == 0)
                {
                }
            }
        }
    }
}
Reply
#8

й porque passo do limite dos veiculos ai acontece isso.. do aumetar as define dos veiculos que vai funcionar normal.
Reply
#9

vlw lek o fs q uso de velo quando da gmx buga
vo tenta cria um estudando em cima desse
Reply
#10

Nads

Sempre qie precisar, so chama
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)