Quote:
Originally Posted by MrDeath
Try it:
Change "forward ChecarVelocimetro();" to "forward ChecarVelocimetro(playerid);"
pawn Код:
public ChecarVelocimetro(playerid) { 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) { TextDrawHideForPlayer(i,Textdraw2); format(string, sizeof(string), "~g~Velocidade ~r~%dKM/h", VelocidadeKM(i)); Textdraw2 = TextDrawCreate(496.000000,355.000000,string); TextDrawAlignment(Textdraw2,0); TextDrawBackgroundColor(Textdraw2,0x000000ff); TextDrawFont(Textdraw2,1); TextDrawLetterSize(Textdraw2,0.299999,1.200000); TextDrawColor(Textdraw2,0xffffffff); TextDrawSetOutline(Textdraw2,1); TextDrawSetProportional(Textdraw2,1); TextDrawSetShadow(Textdraw2,1); TextDrawShowForPlayer(i,Textdraw2); } } return 1; }
and in OnPlayerUpdate:
pawn Код:
ChecarVelocimetro(playerid);
Sorry, I don't speak portuguese
|
MrDeath the TextDraw works perfectly but after about two minutes he disappears and no longer appears so if you restart the server