Quote:
Originally Posted by PT
pawn Код:
public OnPlayerConnect(playerid) { TextoVelocimetro[playerid] = CreatePlayerTextDraw(playerid,200.0, 433.0, "_"); return 1; }
public OnPlayerStateChange(playerid, newstate, oldstate) { if(oldstate == PLAYER_STATE_DRIVER) { KillTimer(Velo[playerid]); PlayerTextDrawHide(playerid,TextoVelocimetro[playerid]); } if(newstate == PLAYER_STATE_DRIVER) { 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; }
a pouco me enganei, tem de 1є matar o timer so depois esconder a textdraw
|
kk correto! Nгo tinha me ligado nisso, desculpa a vergonha kkk Deu certinho agora!