05.08.2012, 18:00
pawn Код:
//no topo
new Text: DonVL[MAX_PLAYERS];
//OnPlayerConnect
DonVL[playerid] = TextDrawCreate(284.5 ,372 , "Velocidade");
TextDrawFont(DonVL[playerid], 3);
TextDrawLetterSize(DonVL[playerid], 0.4, 2.8000000000000003);
TextDrawColor(DonVL[playerid], 0x999999FF);
TextDrawSetOutline(DonVL[playerid], false);
TextDrawSetProportional(DonVL[playerid], true);
TextDrawSetShadow(DonVL[playerid], 1);
TextDrawUseBox(DonVL[playerid], 1);
TextDrawBoxColor(DonVL[playerid], 0xB8C2FFAA);
public OnPlayerStateChange(playerid, newstate, oldstate) {
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) {
format(Don, sizeof(Don), "Velocidade: %i Km/h", GetPlayerSpeed(playerid));
TextDrawSetString(DonVL[playerid], Don);
} else if(newstate != PLAYER_STATE_DRIVER) TextDrawHideForPlayer(playerid, DonVL[playerid]);
return 1;
}