3D labels for Admins.
#1

Hi again,

I need to create 3D labels for Admins, example: if a player is an Administrator, on skin's head it will say (Admin), if a player is Premium VIP,on skin's head it will say (Premium). (I'm Actually using ladmin)

It would be possible??

Something like this.


Someone can help me?

Thanks for reading.
Reply
#2

It`s easy, I show you what I done when I was learning PAWN here is example of that:
pawn Код:
ADMCMD:aduty(playerid, params[], 1)
{
    if(adutycheck[playerid] == true)
    {
        adutycheck[playerid] = true;
        SetPlayerColor(playerid, 0xED136AFF);
        SetPlayerHealth(playerid, 9999999);
        SetPlayerArmour(playerid, 9999999);
        AdminLabel = Create3DTextLabel("ADMIN DUTY", 0xED136AFF, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(AdminLabel, playerid, 0.0, 0.0, 0.5);
        if(pInfo[playerid][pHide] == 0)
        {
            SendMessageToAll(-1, ""embed_orange"[Admin] "embed_white"Administrator %s is now on duty!", pName[playerid]);
            SendMessage(playerid, -1, ""embed_orange"[Admin] "embed_white"You are now on admin duty!");
        }
        else
        {

        }
    }
    else
    {
        adutycheck[playerid] = false;
        SetPlayerColor(playerid, 0xFFFFFFFF);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        Delete3DTextLabel(AdminLabel);
        if(pInfo[playerid][pHide] == 0)
        {
            SendMessageToAll(-1, ""embed_orange"[Admin] "embed_white"Administrator %s is now off duty!", pName[playerid]);
            SendMessage(playerid, -1, ""embed_orange"[Admin] "embed_white"You are now off admin duty!");
        }
        else
        {

        }
    }
    return 1;
}
Reply
#3

Quote:
Originally Posted by Sanady
Посмотреть сообщение
It`s easy, I show you what I done when I was learning PAWN here is example of that:
pawn Код:
ADMCMD:aduty(playerid, params[], 1)
{
    if(adutycheck[playerid] == true)
    {
        adutycheck[playerid] = true;
        SetPlayerColor(playerid, 0xED136AFF);
        SetPlayerHealth(playerid, 9999999);
        SetPlayerArmour(playerid, 9999999);
        AdminLabel = Create3DTextLabel("ADMIN DUTY", 0xED136AFF, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(AdminLabel, playerid, 0.0, 0.0, 0.5);
        if(pInfo[playerid][pHide] == 0)
        {
            SendMessageToAll(-1, ""embed_orange"[Admin] "embed_white"Administrator %s is now on duty!", pName[playerid]);
            SendMessage(playerid, -1, ""embed_orange"[Admin] "embed_white"You are now on admin duty!");
        }
        else
        {

        }
    }
    else
    {
        adutycheck[playerid] = false;
        SetPlayerColor(playerid, 0xFFFFFFFF);
        SetPlayerHealth(playerid, 100);
        SetPlayerArmour(playerid, 100);
        Delete3DTextLabel(AdminLabel);
        if(pInfo[playerid][pHide] == 0)
        {
            SendMessageToAll(-1, ""embed_orange"[Admin] "embed_white"Administrator %s is now off duty!", pName[playerid]);
            SendMessage(playerid, -1, ""embed_orange"[Admin] "embed_white"You are now off admin duty!");
        }
        else
        {

        }
    }
    return 1;
}
Dont have to go through all that.
Reply
#4

I mean when the admin player spawns.

It automatically will say (Admin) above skin's head.

Anyways, Thanks Sanady, I'll try it.
Reply
#5

Guys, I did this, but as I see it doesn't work in game.

Quote:

new Text3D:label1[MAX_PLAYERS];
new Text3D:label2[MAX_PLAYERS];

if(PlayerInfo[playerid][Level] >= 6)
{
label2[playerid] = Create3DTextLabel("(Manager/CEO) ",yellow,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label2[playerid], playerid, 0.0, 0.0, 0.4);
}
else if(PlayerInfo[playerid][Level] >= 5)
{
label1[playerid] = Create3DTextLabel("(Leader)", red,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4);
}
else if(PlayerInfo[playerid][Level] >= 4)
{
label1[playerid] = Create3DTextLabel("(Admin)", yellow,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4);
}
else if(PlayerInfo[playerid][Level] >= 3)
{
label1[playerid] = Create3DTextLabel("(Moderator)", COLOR_LIGHTBLUE,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4);
}
else if(PlayerInfo[playerid][Level] >= 2)
{
label1[playerid] = Create3DTextLabel("(Co-Mod)", COLOR_WHITE,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4);
}
else if(PlayerInfo[playerid][Level] >= 1)
{
label1[playerid] = Create3DTextLabel("(Tester)", COLOR_WHITE,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label1[playerid], playerid, 0.0, 0.0, 0.4);
}

What's wrong?
Reply
#6

Onplayerspawn,check if the player is an admin attach the label,bam your done simple as that.
Reply
#7

You can't see it, only other players do.
Reply
#8

Quote:
Originally Posted by oMa37
Посмотреть сообщение
You can't see it, only other players do.
I tested it with my friend and he said: I don't see anything above skin's head.
Reply
#9

Still doesn't work :/
Reply
#10

Dude use SetPlayerChatBubble

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble

And just make timer so it won't expire after some time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)