SA-MP Forums Archive
NPC Problem! - 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: NPC Problem! (/showthread.php?tid=251159)



NPC Problem! - GeonMake - 25.04.2011

How can I add 3D text over the NPC as in this photo:



Re: NPC Problem! - grand.Theft.Otto - 25.04.2011

pawn Код:
// top of script

new Text3D:BotNameHere[MAX_PLAYERS];

// onplayerspawn

if(!strcmp(npcname, "BotNameHere", true))
{  
    new Float:X, Float:Y, Float:Z; // GetPlayerPos floats
    GetPlayerPos(playerid, X, Y, Z); // Getting player pos
    BotNameHere[playerid] = Create3DTextLabel("BotNameHere",0x00FFFFFF,X, Y, Z,35.0,1);
    Attach3DTextLabelToPlayer(BotNameHere[playerid],playerid,0,0,1.2);
    return 1;
}
Replace BotNameHere with your Bot name of course...


Re: NPC Problem! - GeonMake - 25.04.2011

Thanks so much better. A question: how can drop below 3dtext site? because it is a little above
Edit:
Image