NPC name
#1

Hi everyone i need some help i want to know how can i display a npc name i tried a lot searching but nothing worked i also read a tuttorial of samp to how to add a npc name but that didnt worked for me can someone other help.
Reply
#2

As a name tag? Create and attach a 3D text label to the NPC when first spawned.
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
As a name tag? Create and attach a 3D text label to the NPC when first spawned.
can u give some code example?
Reply
#4

Quote:
Originally Posted by Owen007
Посмотреть сообщение
can u give some code example?
In OnPlayerSpawn, check if the player is NPC and if its name is the bot you connected (see here: https://sampforum.blast.hk/showthread.php?tid=95034) and just create and attach. An example of both functions can be seen here: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer

All you have to do is replace the text and color.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
In OnPlayerSpawn, check if the player is NPC and if its name is the bot you connected (see here: https://sampforum.blast.hk/showthread.php?tid=95034) and just create and attach. An example of both functions can be seen here: https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer

All you have to do is replace the text and color.
but i have 4 vehicle driving bots i mean u saying to add a 3d label to player but how can i add it to a specific npc
Reply
#6

Attach3DTextLabelToPlayer
Reply
#7

Quote:
Originally Posted by Owen007
Посмотреть сообщение
but i have 4 vehicle driving bots i mean u saying to add a 3d label to player but how can i add it to a specific npc
The tutorial I linked you specifically shows that you check the name of the NPC before putting it in the created vehicle. That is where you should create and attach the 3D text label, along with PutPlayerInVehicle function.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)