12.02.2012, 05:33
How to put NPC Name over their head? i need this please help me
public OnGameModeInit()
{
ConnectNPC("Your NPC NAME HERE","pilot"); // Npc name there
return 1;
}
#include <a_samp>
new Text3D:BotName;
public OnGameModeInit()
{
BotName = Create3DTextLabel("[bot name here]",0xFFFFFFFF,0.0,0.0,0.0,30.0,0,0);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new name[24];
GetPlayerName(playerid,name,24);
if(!strcmp(name,"[bot name here]",true)) Attach3DTextLabelToPlayer(BotName,playerid,0.0,0.0,0.5);
}
return 1;
}
new Text3D:Your3DName = Create3DTextLabel("My Cool NPC", YOUR_COLOR_HERE, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(Your3DName, playerid, 0.0, 0.0, 0.7);