How Can name NPC
#1

How to put the name of the npc?? ??



Please example
Reply
#2

Attach Label to his head.
Reply
#3

Please example
Reply
#4

Up.....
Reply
#5

Quote:
Originally Posted by KingServerIRAN
Посмотреть сообщение
Please example
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToPlayer
Reply
#6

Try this:

Quote:

if(IsPlayerNPC(playerid))
{
if(!strcmp(npcname, "Joey", true)) // if You have some more NPCs You'll need this, for an example if You called him " Joey ".
{
new string[50];
new name[MAX_PLAYER_NAME+1];

GetPlayerName(playerid, name, sizeof(name)); // It's gonna get NPC's name.

format(string,sizeof(string),"%s (%d)", name, playerid); // His name and ID.

new Text3D:MyNPC = Create3DTextLabel(string, 0xE60000FF, 30.0, 40.0, 50.0, 40.0, 0); // 0xE60000FF - Red colour.
Attach3DTextLabelToPlayer(MyNPC, playerid, 0.0, 0.0, 0.7); // This is going to attach 3DTextLabel to the NPC "Joey", above his head.
}
}

// TheViking
This is gonna work, but please let me know if something's wrong.
Thank You.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)