Another utterly non-random question (Nametags-related)
#1

Is there any possibility to make a nametag player-styled for actors (health and armor bar are not required)? Is there any other, more beautiful way than calculating 3DTextDraw position above actor's head?
Thanks.
Reply
#2

yes there is this can help u to make a player name that appers on head in 3d.

Код:
#include <a_samp>
#define NAME_DRAWDISTANCE (5) // The distance of the 3d text nametags to appear.
new Text3D:NameTag[MAX_PLAYERS];
new playerName[MAX_PLAYER_NAME];

public OnGameModeInit()
{
    SetNameTagDrawDistance(0.0);
    ShowNameTags(false);
	return 1;
}

public OnPlayerConnect(playerid)
{
	playerName = p_name( playerid );
	NameTag[playerid] = Create3DTextLabel( playerName, 0xFFFFFFFF, 0, 0, 0, NAME_DRAWDISTANCE, 0, 1 );
    Attach3DTextLabelToPlayer(NameTag[playerid], playerid, 0.0, 0.0, 0.2);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    Delete3DTextLabel( NameTag[playerid] );
	return 1;
}

stock p_name( playerid )
{
	new p_namev[MAX_PLAYER_NAME];
	GetPlayerName(playerid, p_namev, MAX_PLAYER_NAME);
	return p_namev;
}
Reply
#3

But I need to create a nametag for an actor.
Besides, I was hoping I won't have to use 3DTextDraw. I can do calculations via 3DTextDraw myself.

So... Is posssible or is not possible?
Reply
#4

Bro i dont think its possible but maybe wait for others to reply and good luck.
Reply
#5

Quote:
Originally Posted by Owen007
Посмотреть сообщение
Bro i dont think its possible but maybe wait for others to reply and good luck.
Thanks! You too!
Reply
#6

Its not possible, actors are not players. The only way at the moment is with 3D Labels.
My suggestion is to turn off player name tags, and replace them with 3D Labels for players. Then you can do the same for actors.
Reply
#7

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Its not possible, actors are not players. The only way at the moment is with 3D Labels.
My suggestion is to turn off player name tags, and replace them with 3D Labels for players. Then you can do the same for actors.
Ok thanks for the tip. I'll stick to labels then.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)