[PORQUE?]OnPlayerUpdate
#3

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
Reply


Messages In This Thread
[PORQUE?]OnPlayerUpdate - by TiagoPS - 16.08.2010, 19:16
Re: [PORQUE?]OnPlayerUpdate - by MrDeath537 - 16.08.2010, 19:27
Re: [PORQUE?]OnPlayerUpdate - by TiagoPS - 16.08.2010, 19:32
Re: [PORQUE?]OnPlayerUpdate - by MrDeath537 - 16.08.2010, 19:40
Re: [PORQUE?]OnPlayerUpdate - by TiagoPS - 16.08.2010, 19:53
Re: [PORQUE?]OnPlayerUpdate - by Kasura - 16.08.2010, 21:52
Re: [PORQUE?]OnPlayerUpdate - by LeLeTe - 16.08.2010, 22:00
Re: [PORQUE?]OnPlayerUpdate - by [VTLS]Victor - 16.08.2010, 22:26
Re: [PORQUE?]OnPlayerUpdate - by LeLeTe - 16.08.2010, 22:30
Re: [PORQUE?]OnPlayerUpdate - by Kasura - 16.08.2010, 23:12

Forum Jump:


Users browsing this thread: 1 Guest(s)