[Ajuda] Velocimetro
#9

Quote:
Originally Posted by n0minal
Посмотреть сообщение
Entгo bota assim: if(oldstate == PLLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_PASSENGER)

@Edit cara isso nгo vai funcionar apenas aswim, vc precisa criar uma variavel ou funcгo para saber se o player й motorista ou nгo, caso seja vc mostra as textdraws na callback q atualiza as textdraws, caso n seja vc faz hide pra ele...
Fiz isto, mas continuou aparecendo para o passageiro.
Isto que eu fiz aqui, de verificar se o player esta conectado e se lele esta dentro do veiculo esta certo?

pawn Код:
public Speedo()
{
    for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
    {
        if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
        {
            TextDrawHideForPlayer(playerid, Velo);
            format(string,sizeof(string),"~w~%d", VelocidadeKM(playerid));
            TextDrawSetString(Velo, string);
            TextDrawShowForPlayer(playerid, Velo);

            format(string,sizeof(string),"~p~%s", Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
            TextDrawSetString(Veiculo, string);
            TextDrawShowForPlayer(playerid, Veiculo);

            GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
            format(string,sizeof(string),"~w~%s", zone);
            TextDrawSetString(Localidades, string);
            TextDrawShowForPlayer(playerid, Localidades);

            format(string,sizeof(string),"~g~Combustivel  ~r~%d% ~w~ L", Gas[GetPlayerVehicleID(playerid)]);
            TextDrawSetString(Combust, string);
            TextDrawShowForPlayer(playerid, Combust);
           
            format(string,sizeof(string),"  ~y~KM~i~/~y~H", Gas[GetPlayerVehicleID(playerid)]);
            TextDrawSetString(Kmh, string);
            TextDrawShowForPlayer(playerid, Kmh);
        }
        else
        {
            TextDrawHideForPlayer(playerid, Combust);
            TextDrawHideForPlayer(playerid, Velo);
            TextDrawHideForPlayer(playerid, Kmh);
            TextDrawHideForPlayer(playerid, Veiculo);
            TextDrawHideForPlayer(playerid, Localidades);
        }
    }
}
Reply


Messages In This Thread
Velocimetro - by FernandoSS - 21.07.2014, 01:20
Re: Velocimetro - by Ts3 - 21.07.2014, 01:37
Re: Velocimetro - by MultiKill - 21.07.2014, 01:41
Re: Velocimetro - by Chefгo - 21.07.2014, 05:53
Re: Velocimetro - by FernandoSS - 21.07.2014, 15:44
Re: Velocimetro - by n0minal - 21.07.2014, 15:53
Re: Velocimetro - by FernandoSS - 21.07.2014, 15:59
Re: Velocimetro - by n0minal - 21.07.2014, 16:07
Re: Velocimetro - by FernandoSS - 21.07.2014, 16:11
Re: Velocimetro - by n0minal - 21.07.2014, 16:15

Forum Jump:


Users browsing this thread: 2 Guest(s)