31.01.2011, 18:08
Hey i want the ugly health bar out and replace the SetNameTags off but how do i attach a 3d text label onto a player with his name above it?
Thank you
Thank you
public OnGameModeInit()
{
ShowNameTags( 0 );
}
new Text3D:NameTag[500];
public OnPlayerConnect(playerid)
{
new pName[24], string[30];
GetPlayerName(playerid, pName, 24);
format(string, sizeof(string), "%s (%i)", pName, playerid);
NameTag[playerid] = Create3DTextLabel(string, GetPlayerColor(playerid), 0.0, 0.0, 0.0, 0.0, 0);
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, +2.5) //Not sure about the Z Offset, you might have to play with it
return 1;
}
#include <a_samp>
public OnGameModeInit()
{
ShowNameTags( 0 );
}
new Text3D:NameTag[500];
public OnPlayerConnect(playerid)
{
new pName[24], string[30];
GetPlayerName(playerid, pName, 24);
format(string, sizeof(string), "%s (%i)", pName, playerid);
NameTag[playerid] = Create3DTextLabel(string, GetPlayerColor(playerid), 0.0, 0.0, 0.0, 0.0, 0);
Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 2.5); //Not sure about the Z Offset, you might have to play with it
return 1;
}