Quote:
Originally Posted by MrDeath
Sorry, I didn't understand.
Try it:
pawn Код:
new Text:Velocimetro[MAX_PLAYERS];
public OnGameModeInit() { // Other stuff...
for(new x = 0; x < MAX_PLAYERS; x ++) { Velocimetro[x] = TextDrawCreate(496.000000,355.000000, ""); TextDrawAlignment(Velocimetro[x],0); TextDrawBackgroundColor(Velocimetro[x],0x000000ff); TextDrawFont(Velocimetro[x],1); TextDrawLetterSize(Velocimetro[x],0.299999,1.200000); TextDrawColor(Velocimetro[x],0xffffffff); TextDrawSetOutline(Velocimetro[x],1); TextDrawSetProportional(Velocimetro[x],1); TextDrawSetShadow(Velocimetro[x],1); } }
public ChecarVelocimetro(i) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new Float:xa[3]; new string[128]; GetPlayerPos(i, xa[0], xa[1], xa[2]); if(IsPlayerInRangeOfPoint(i, 100, xa[0], xa[1], xa[2]) && IsPlayerInAnyVehicle(i) && GetPlayerState(i) == PLAYER_STATE_DRIVER) { format(string, sizeof(string), "Velocidade: %i", VelocidadeKM(i)); TextDrawSetString(Velocimetro[i], string); TextDrawShowForPlayer(i, Velocimetro[i]); } } return 1; }
|
Did not work this way also the TextDraw works normally but after two minutes or so he disappears and only reappears if restart served, I think it has something to do with OnPlayerUpdate think he only works a certain time after the player connects, I think the way will be to use SetTimer's but I did not want to use because there's a real impression of speed because of the delay to draw the public's
Sorry my bad
English is that I'm
Brazilian