28.07.2013, 23:35
new 3DTextLabel:PlayerVehicleText[MAX_PLAYERS];
// no comando
Delete3DTextLabel(PlayerVehicleText[playerid]);
new strin[128];
format(strin, 128, "Carro de %s", GetName(playerid));
PlayerVehicleText[playerid] = Create3DTextLabel(, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
Attach3DTextLabelToVehicle(PlayerVehicleText[playerid] , PlayerVehicleText[PlayerVehicle[playerid]], 0.0, 0.0, 2.0);
[/pawn]
Se nгo me engano й assim que se faz. A parte que й para colocar no comando, coloque logo apуs a criaзгo do veнculo.
Se precisar da stock GetName:
@edit coloquei pra formatar a string com o nome.
// no comando
Delete3DTextLabel(PlayerVehicleText[playerid]);
new strin[128];
format(strin, 128, "Carro de %s", GetName(playerid));
PlayerVehicleText[playerid] = Create3DTextLabel(, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
Attach3DTextLabelToVehicle(PlayerVehicleText[playerid] , PlayerVehicleText[PlayerVehicle[playerid]], 0.0, 0.0, 2.0);
[/pawn]
Se nгo me engano й assim que se faz. A parte que й para colocar no comando, coloque logo apуs a criaзгo do veнculo.
Se precisar da stock GetName:
pawn Код:
stock GetName(playerid)
{
new Nome[MAX_PLAYER_NAME];
GetPlayerName(playerid, Nome, MAX_PLAYER_NAME);
return Nome;
}