[Ajuda] Velocimtro
#3

Teanta:
pawn Код:
//no topo
new Text:DonVL
//gamemodeinit
DonVL = TextDrawCreate(284.5 ,372 , "Velocidade");
    TextDrawFont(DonVL , 3);
    TextDrawLetterSize(DonVL , 0.4, 2.8000000000000003);
    TextDrawColor(DonVL , 0x999999FF);
    TextDrawSetOutline(DonVL , false);
    TextDrawSetProportional(DonVL , true);
    TextDrawSetShadow(DonVL , 1);
    TextDrawUseBox(DonVL, 1);
    TextDrawBoxColor(DonVL, 0xB8C2FFAA);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        TextDrawShowForPlayer(i, DonVL);
    }
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    SetTimer("DCarro",3,true);
    TextDrawShowForPlayer(playerid, DonVL);
    return 1;
}
forward DCarro(playerid,veiculo);
public DCarro(playerid,veiculo)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        format(Don, sizeof(Don), "Velocidade: %i Km/h", GetPlayerSpeed(playerid));
        TextDrawSetString(DonVL, Don);
    }
    else
    {
        TextDrawDestroy(DonVL);
    }
    return true;
}
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)