05.08.2012, 21:32
Apague esses cуdigos e coloque
:
Espero ter ajudado
.
![afro](images/smilies/mrgreen.gif)
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
![Tongue](images/smilies/razz.gif)