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

Is it possible to make an 3d dynamic text below the players name tag??

When i go ON duty. There should be a Little 3d dynamic text saying that "ON duty Admin. Do not Attack!"

Thanks in advance!

Код:
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);
				//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
			{
				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;
}
Reply
#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
#3

Quote:
Originally Posted by Mriss
Посмотреть сообщение
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.
Thats 'below' players name tag?
Reply
#4

Код:
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(43925) : warning 213: tag mismatch
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(43926) : warning 213: tag mismatch
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(43935) : error 017: undefined symbol "label"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
43925:   new Admin3DText:label = Create3DTextLabel("ADMIN ON DUTY, Do not attack!", 0xFFEC0000, 0, 0, 0, 25, 0, 0);
Код:
43926:    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
Код:
43935:                 DeletePlayer3DTextLabel(playerid, label);
Reply
#5

It isnt possible to do Below but, here it is>

pawn Код:
new Admin3DText:label = Create3DTextLabel("ADMIN, DO NOT ATTACK", 0xFF9400FF, 0, 0, 0, 25, 0, 0);

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;
}
Reply
#6

Quote:
Originally Posted by Mriss
Посмотреть сообщение
It isnt possible to do Below but, here it is>

pawn Код:
new Admin3DText:label = Create3DTextLabel("ADMIN, DO NOT ATTACK", 0xFF9400FF, 0, 0, 0, 25, 0, 0);

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;
}
I GET THIS FUCKING ERROR HELP MEE



Код:
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(43927) : warning 213: tag mismatch
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(43928) : warning 213: tag mismatch
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(43937) : error 017: undefined symbol "label"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
The code is caming from what codes you give to me
Reply
#7

Anywhere above public OnGameModeInit()
pawn Код:
new Text3D: AdminMode[MAX_PLAYERS] = {Text3D: INVALID_3DTEXT_ID, ...};
Under public OnPlayerConnect(playerid)
pawn Код:
AdminMode[playerid] = Text3D: INVALID_3DTEXT_ID;
Under public OnPlayerDeath(playerid,killerid,reason)
pawn Код:
Delete3DTextLabel(AdminMode[playerid]);
and take up this command!
Код:
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);
				//SetPlayerColor(playerid, COLOR_TWORANGE);
				//SetPlayerSkin(playerid, 294); - Commented by Voltage
                                                   AdminMode[playerid] = Create3DTextLabel("Administrator on duty!\n*Do not Attack*",0xF600F6FF,30.0,40.0,50.0,40.0,0);
                                                   Attach3DTextLabelToPlayer(AdminMode[playerid],playerid,0.0,0.0,0.5);
	
				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
			{
				SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
				//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                                                   Delete3DTextLabel(AdminMode[playerid]);
				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;
}
Reply
#8

Quote:
Originally Posted by biker122
Посмотреть сообщение
Anywhere above public OnGameModeInit()
pawn Код:
new Text3D: AdminMode[MAX_PLAYERS] = {Text3D: INVALID_3DTEXT_ID, ...};
Under public OnPlayerConnect(playerid)
pawn Код:
AdminMode[playerid] = Text3D: INVALID_3DTEXT_ID;
Under public OnPlayerDeath(playerid,killerid,reason)
pawn Код:
Delete3DTextLabel(AdminMode[playerid]);
and take up this command!
Код:
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);
				//SetPlayerColor(playerid, COLOR_TWORANGE);
				//SetPlayerSkin(playerid, 294); - Commented by Voltage
                                                   AdminMode[playerid] = Create3DTextLabel("Administrator on duty!\n*Do not Attack*",0xF600F6FF,30.0,40.0,50.0,40.0,0);
                                                   Attach3DTextLabelToPlayer(AdminMode[playerid],playerid,0.0,0.0,0.5);
	
				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
			{
				SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
				//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
                                                   Delete3DTextLabel(AdminMode[playerid]);
				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;
}
wtf

Код:
C:\Users\Cris\Desktop\0.3z Server\Philippines Roleplay (2014)\gamemodes\PHRP_V1.1.pwn(8161) : error 017: undefined symbol "AdminMode"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
8161:	AdminMode[playerid] = Text3D: INVALID_3DTEXT_ID;
Reply
#9

Try to change all those "AdminMode" to "AM"
or make a new line ENUM called "AdminMode"(no quotes).
Change all "AdminMode[playerid]" to "PlayerInfo[playerid][AdminMode]" (NO QUOTES :3)
Reply
#10

Код:
SendClientMessageEx(playerid, COLOR_REALRED, "NOTE: You may now set your admin name. (/setmyname)
Код:
SendClientMessageEx(playerid, COLOR_REALRED, "NOTE: You may now set your admin name. (/setmyname) ");
Код:
DeletePlayer3DTextLabel(playerid, label)
Код:
DeletePlayer3DTextLabel(playerid, label);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)