05.08.2012, 17:29
Estudei alguns velocimetros ate fazer esse.
Porem ele nao aparece.
Ajuda ae
Porem ele nao aparece.
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);
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);
TextDrawShowForPlayer(playerid, DonVL);
}
else
{
TextDrawDestroy(DonVL);
}
return true;
}