3d Dynamic Text below the players Name Tag??????
#2

Try this
pawn Код:
CMD:aduty(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
    {
            if(PlayerInfo[playerid][pAdminDuty] == 0)
            {

                SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
                SendClientMessageEx(playerid, COLOR_REALRED, "NOTE: You may now set your admin name. (/setmyname)
                PlayerInfo[playerid][pAdminDuty] = 1;
                SetPlayerHealth(playerid, 100000);
                SetPlayerArmour(playerid, 100000);
                new Admin3DText:label = Create3DTextLabel("
ADMIN, DO NOT ATTACK", 0xFF9400FF, 0, 0, 0, 25, 0, 0);
                Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
                //SetPlayerColor(playerid, COLOR_TWORANGE);
                //SetPlayerSkin(playerid, 294); - Commented by Voltage
                new string[128];
                format(string, sizeof(string), "
Administrator %s(ID %d) is now on Admin Duty!", GetPlayerNameEx(playerid), playerid);
                ABroadCast(COLOR_YELLOW, string, 1);
            }
            else
            {
                DeletePlayer3DTextLabel(playerid, label)
                SendClientMessageEx(playerid, COLOR_RED, "
You are now off admin duty!");
                //SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                SetPlayerHealth(playerid, 100);
                SetPlayerArmour(playerid, 0);
                SetPlayerToTeamColor(playerid);
                //SetPlayerSkin(playerid, 299); - Commented by Voltage
                PlayerInfo[playerid][pAdminDuty] = 0;
                new string[128];
                format(string, sizeof(string), "
Administrator %s(ID %d) is now Off Admin Duty! ( Leave the Admin to Roleplay )", GetPlayerNameEx(playerid), playerid);
                ABroadCast(COLOR_YELLOW, string, 1);
            }
    }
    return 1;
}
UNTESTED, Tell me if it doesnt work.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)