SA-MP Forums Archive
Names over NPCs - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Names over NPCs (/showthread.php?tid=107040)



Names over NPCs - DawidQ123456789 - 07.11.2009

Hello!
I have a small question
How to make names over NPCs?
Example: /imageshack/img52/3563/samp002.png
(NPC SF ROUTE BUS DRIVER 1)
Please give me help
PS. Sorry for my bad English


Re: Names over NPCs - Sergei - 07.11.2009

3D texts.


Re: Names over NPCs - DawidQ123456789 - 07.11.2009

THX for reply
Could you explain me more?


Re: Names over NPCs - Sergei - 07.11.2009

I'm sorry, but I can't. However, I have a good friend who can explain you in details. Click here to PM him.


Re: Names over NPCs - DawidQ123456789 - 07.11.2009

THX for next reply :*


Re: Names over NPCs - Badger(new) - 07.11.2009

From reading SA-MP wiki, I'm guessing you do:
pawn Код:
new Text:Test=Create3DTextLabel("Blah Blah",0xFFFFFFAA,0,0,-50,25,0,0)
Attach3DTextLabelToPlayer(Test,playerid,0,0,10);
https://sampwiki.blast.hk/wiki/Create3DTextLabel
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer


Re: Names over NPCs - cristab - 09.11.2009

or

put your script


Код:
new PlayerText3D:playertextid[MAX_PLAYERS];
stock AddTextPlayer3D(playerid,COLOR,text[],Float:Distance)
{
	playertextid[playerid] = PlayerText3D:Create3DTextLabel(text, COLOR, 0.0,0.0,0.0, Distance, 0, 0);
	Attach3DTextLabelToPlayer(Text3D:playertextid[playerid], playerid, 0.0, 0.0, -0.4);
	return 1;
}

stock DeletePlayerText(playerid)
{
	Delete3DTextLabel(Text3D:playertextid[playerid]);
	return 1;
}
and

Код:
public OnPlayerSpawn(playerid)
{
  if(IsPlayerNPC(playerid)) {

	new playername[64];
	GetPlayerName(playerid,playername,64);

 	if(!strcmp(playername,"Mikael",true)) {
    PutPlayerInVehicle(playerid, Coach1, 0);
    SetPlayerColor(playerid,COLOR_WHITE);
    SetPlayerSkin(playerid,16);
    AddTextPlayer3D(playerid,COLOR_AQUA,"Mikael",40.0);
	}