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);
}
}
}