[PORQUE?]OnPlayerUpdate
#5

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
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)