How to make a [BOT] name tag?
#1

Just like how player have a name tag over there head, how can I make one for a bot? I don't really like using variables with Attach3DTextLabel and Create3DTextLabel etc...

Any other ways how?

Or how can I make the 3DTextLabel over the bots head to be bolder and easier to see?
Reply
#2

Under inc's:
pawn Код:
new Text3D:MyNpc[MAX_PLAYERS];
OnPlayerSpawn:
pawn Код:
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"MyNpc Name",true))//change MyNpc name to your npc name :)
{
    MyNpc[playerid] = Create3DTextLabel("bla bla bla bla bla",0x33FF33AA, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(MyNpc[playerid],playerid,0.0, 0.0, 0.7);
}
Reply
#3

NicE greate work!
for the post
Reply
#4

Quote:
Originally Posted by Clive
Посмотреть сообщение
Under inc's:
pawn Код:
new Text3D:MyNpc[MAX_PLAYERS];
OnPlayerSpawn:
pawn Код:
new playername[64];
GetPlayerName(playerid,playername,64);
if(!strcmp(playername,"MyNpc Name",true))//change MyNpc name to your npc name :)
{
    MyNpc[playerid] = Create3DTextLabel("bla bla bla bla bla",0x33FF33AA, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(MyNpc[playerid],playerid,0.0, 0.0, 0.7);
}
Waste of 499 values. Just saying.

This forum requires that you wait .. <= This is f*cking annoying. 62 seconds, 36 seconds, 9 seconds, ...
Reply
#5

use 3dtextlabels and attach3dtextlabeltoplayer
Reply
#6

I made this function:
pawn Код:
stock SetNPCTag() // by: Admantis
{
    new sz_Name[24], sz_NewName[31];
    sz_NewName = "[BOT]";
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (!IsPlayerNPC(i))
            continue;
           
        GetPlayerName(i, sz_Name, 24);
        strins(sz_NewName, sz_Name, 25);
        SetPlayerName(i, sz_NewName);
    }
   
    return sz_NewName; // This function returns the name with [BOT] tag
}
Reply
#7

LOL grand you could ask me... xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)