[Help] Admin Tag
#1

Could someone explain how to make an admin tag above the admin's head?
Reply
#2

First you need to create a 3dtextlabel and then you need to attach it to player!
Example:
pawn Код:
public OnPlayerConnect(playerid)
{
    new Text3D:label = Create3DTextLabel("Hello, I am new here!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    return 1;
}
Note: You wont be able to see attached 3dTextLabels to your own player just like the NameTag of SA-MP.
Reply
#3

How would you do it for admins?

Like:

Example Roleplay Administrator
Example Name
Server Owner
Reply
#4

Easy.

pawn Код:
public OnPlayerConnect(playerid)
{
    new pName[24], string[52];
    GetPlayerName(playerid, pName, 24);
    format(string, sizeof(string), "Example Roleplay Administrator\n%s\nServer Owner", pName);
    new Text3D:label = Create3DTextLabel(string, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    return 1;
}
Reply
#5

pawn Код:
public OnPlayerConnect(playerid)
{
    if(pInfo[playerid][pAdmin] > 0)//Change this to your game modes admin variable!
    {
        new Text3D:label = Create3DTextLabel("Administrator", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
        return 1;
    }
}
Reply
#6

Thanks Ballu, forgot that part >.<
Reply
#7

Quote:
Originally Posted by iGetty
Посмотреть сообщение
Thanks Ballu, forgot that part >.<
Haha not a problem my bro!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)