Name off
#1

Код:
#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;
}
I have this code and it works perfectly it hides the hleath and the armor bar and shows the name only. Now I tried making the code that will hide the name and it won't work ... For some reason its not hiding the name.

Commands: /name off - it would hide the name
/name on - it would show name back up with ONLY name.
Reply


Messages In This Thread
Name off - by xdarren - 22.10.2013, 09:32
Re: Name off - by xdarren - 22.10.2013, 10:05
Re: Name off - by xdarren - 22.10.2013, 15:34
Re: Name off - by xdarren - 22.10.2013, 21:34

Forum Jump:


Users browsing this thread: 1 Guest(s)