[Help] Admin Tag
#1

Anyone know how to make an admin tag? For instance:
Example Roleplay
[name]
Administrator
Reply
#2

You can SetPlayerName() for admins under OnPlayerSpawn() callback.

will be like:
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(pinfo[playerid][pAdmin] > 0) // change the array to your script array for admins.
    {
        new aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, aname, sizeof(aname));
        format(name,sizeof(name),"[Admin]%s",aname) // setting admin tag with his name into a string.
        SetPlayername(playerid,name);
    }
    return 1;
}
Reply
#3

Wouldn't better to post it under OnPlayerText?
Reply
#4

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
Wouldn't better to post it under OnPlayerText?
He wants to set it for an admin. OnPlayerText will keep on changing his name once he type's something in the chat!
Reply
#5

I want it to be like..

CMD: togadmintag

and then the other shit below it haha

I don't know how to script.
Reply
#6

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
He wants to set it for an admin. OnPlayerText will keep on changing his name once he type's something in the chat!
I thought he wanted to do it.

When an admin talks in the chat will be:

[ADMIN]%s, name);

PHP код:
public OnPlayerText(playeridtext[])
{
new 
AMSG[250];
new 
Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
new 
msg[250];
    if(
PlayerInfo[playerid][pAdmin] >= 3)
        {
            
format(AMSG,sizeof(AMSG),"[Senior Admin]: %s says: %s "Namemsg);
            
SendClientMessageToAll(GREENAMSG);
        }
return 
1;

Reply
#7

Guys I just want a tag for the admins like on their head.

Like in the example above.
Reply
#8

Sort it out yourself. We are here to help not to spoon feed!
Reply
#9

Can you just help me figure this out? I am learning.
Reply
#10

I think it will be like this:

PHP код:
new Text3D:ADU[MAX_PLAYERS];
CMD:togadmintag(playeridparams[])
    {
        if(
IsPlayerConnected(playerid))
        {
            
ADU[playerid] = Create3DTextLabel("Administrator",0xE20000FF,30.0,40.0,50.0,8,1);
            
Attach3DTextLabelToPlayer(ADU[playerid], playerid0.00.00.25);
        }
        return 
1;
    } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)