SA-MP Forums Archive
Admin tag - 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)
+--- Thread: Admin tag (/showthread.php?tid=425809)



Admin tag - Lambordi - 26.03.2013

How would I construct an admin tag?

This is going to be for a roleplay server, for someone who is an administrator obviously.

It would be like, Example Roleplay Administrator
And then I want it to show the rank of the administrator.
How would I do this?


Re: Admin tag - kamzaf - 26.03.2013

Do you mean a tag by like something on top of a players head that says: "RopePlay Administrator!"?


Re: Admin tag - Lambordi - 26.03.2013

It will be like this:
On the head, First row is the server name. For example, just like Example Roleplay or something
Second: The administrators name
Third: Admin rank (Example: Senior Admin or something.)


Re: Admin tag - Lambordi - 27.03.2013

Anyone?


Re: Admin tag - Gamer_007 - 27.03.2013

Hmm the 3D Text.Use the below code.

pawn Код:
public OnPlayerSpawn(playerid)
{
if(Adminvariable == Admin Rank)//Change your variables according to your script
{
new Text3D:label = Create3DTextLabel("Senior Admin", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
}
return 1;
}



Re: Admin tag - Scenario - 27.03.2013

While Gamer_007 had the right idea, he didn't really give you what you had asked for.

This is basically what you're asking for. You'll need to fill the "szAdminRank" string with the admin's actual rank, though.

pawn Код:
new
    Text3D:adminLabel[MAX_PLAYERS]
;

public OnPlayerSpawn(playerid)
{
    if(IsPlayerAdmin(playerid))
    {
        new
            szString[128],
            szAdminRank[50] = "RealCop228's Bitch"
        ;
       
        format(szString, sizeof(szString), "%s\n%s", SERVER_NAME, szAdminRank);
        adminLabel[playerid] = Create3DTextLabel(szString, 0xFFFF00FF, 0.0, 0.0, 0.0);
        Attatch3DTextLabelToPlayer(adminLabel[playerid], playerid, 0.0, 0.0, 0.7);
    }
    return 1;
}



Re: Admin tag - RajatPawar - 27.03.2013

RealCop, won't this
pawn Код:
szAdminRank = "RealCop228's Bitch"
be wrong, you forgot to make it into an string, make sure to !


Re: Admin tag - Scenario - 27.03.2013

Quote:
Originally Posted by Rajat_Pawar
Посмотреть сообщение
RealCop, won't this
pawn Код:
szAdminRank = "RealCop228's Bitch"
be wrong, you forgot to make it into an string, make sure to !
You would be correct.