[Ajuda] Velocimtro
#7

Apague esses cуdigos e coloque :


pawn Код:
//No Topo do GM:


new Text:Velocimetro[MAX_PLAYERS];
new TimerVelocimetro[MAX_PLAYERS];



//No OnGameModeInit:


for(new x = 0; x < MAX_PLAYERS; x++)
    {
        Velocimetro[x] = TextDrawCreate(284.5 ,372 , "Velocidade");
        TextDrawFont(Velocimetro[x], 3);
        TextDrawLetterSize(Velocimetro[x], 0.4, 2.8000000000000003);
        TextDrawColor(Velocimetro[x], 0x999999FF);
        TextDrawSetOutline(Velocimetro[x], false);
        TextDrawSetProportional(Velocimetro[x], true);
        TextDrawSetShadow(Velocimetro[x], 1);
        TextDrawUseBox(Velocimetro[x], 1);
        TextDrawBoxColor(Velocimetro[x], 0xB8C2FFAA);
    }



//No OnPlayerDisconnect:


KillTimer(TimerVelocimetro[playerid]);



//No OnPlayerStateChange:


if(newstate == PLAYER_STATE_DRIVER)
    {
        TimerVelocimetro[playerid] = SetTimerEx("AtualizarVelocimetro", 100, true, "n", playerid);
    }
    else if(oldstate == PLAYER_STATE_DRIVER)
    {
        KillTimer(TimerVelocimetro[playerid]);
        TextDrawHideForPlayer(playerid, Velocimetro[playerid]);
    }



//E, no Final do GM:


forward AtualizarVelocimetro(playerid);
public AtualizarVelocimetro(playerid)
{
    static STR[30];
    format(STR, 30, "Velocidade: %i Km/h", GetPlayerSpeed(playerid));
    TextDrawSetString(Velocimetro[playerid], STR);
    TextDrawShowForPlayer(playerid, Velocimetro[playerid]);
    return 1;
}


Espero ter ajudado .
Reply


Messages In This Thread
Velocimtro - by Don_Speed - 05.08.2012, 17:29
Re: Velocimtro - by paulor - 05.08.2012, 18:00
Re: Velocimtro - by Skun Fly - 05.08.2012, 18:01
Re: Velocimtro - by paulor - 05.08.2012, 18:19
Re: Velocimtro - by Don_Speed - 05.08.2012, 20:14
Re: Velocimtro - by Sampizito - 05.08.2012, 21:02
Re: Velocimtro - by rjjj - 05.08.2012, 21:32
Re: Velocimtro - by paulor - 05.08.2012, 21:40
Re: Velocimtro - by Don_Speed - 06.08.2012, 00:07
Re: Velocimtro - by paulor - 06.08.2012, 00:12

Forum Jump:


Users browsing this thread: 1 Guest(s)