[Ajuda] Velocimetro
#3

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(oldstate == PLAYER_STATE_DRIVER)
    {
        PlayerTextDrawHide(playerid,TextoVelocimetro[playerid]);
        KillTimer(Velo[playerid]);
    }
    if(newstate == PLAYER_STATE_DRIVER)
    {
        TextoVelocimetro[playerid] = CreatePlayerTextDraw(playerid,200.0, 433.0, "_");
        Velo[playerid] = SetTimer("TimeVelocimetro", 100, true);//time que vai atualizar o velocimetro
    }
    return 1;
}

public TimeVelocimetro(playerid)
{
    new str[50];
    format(str, sizeof(str), "Velocidade: %i", VelocidadeDoVeiculo(playerid));
    PlayerTextDrawSetString(playerid, TextoVelocimetro[playerid], str);
    PlayerTextDrawShow(playerid, TextoVelocimetro[playerid]);
    return 1;
}
serio tu й de 2012?

Se tu tem um timer tem de o "matar" ou ele continuara ativo.
Sim sou mais nгo sou bem ativo "sу observo!"

Tentei com o seu exemplo mais deu na mesma o textdraw fica visivel da mesma forma.
Reply


Messages In This Thread
Velocimetro - by StrondaXxT - 04.02.2015, 12:50
Re: Velocimetro - by PT - 04.02.2015, 13:01
Re: Velocimetro - by StrondaXxT - 04.02.2015, 13:27
Re: Velocimetro - by PT - 04.02.2015, 13:30
Re: Velocimetro - by StrondaXxT - 04.02.2015, 13:40

Forum Jump:


Users browsing this thread: 1 Guest(s)