Create3Dtext to player(+rep)
#1

Hi,
Can anyone help me how to fix this? At my Attach3DTextLabelToPlayer. That should be attached when you only go ON duty admin and it should be removed when you go off duty. Then when a players join it randomly attached to them. I dont know why.

Like this: Its so much buggy. I dont know wheres the problem caming from. That 3DLabelText should be only Attached to "ON DUTY ADMIN" and it will be removed when you go OFF DUTY







Please help me

Aduty Code

Код:
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!");
				PlayerInfo[playerid][pAdminDuty] = 1;
				SetPlayerHealth(playerid, 100000);
				SetPlayerArmour(playerid, 100000);
				SetPlayerColor(playerid, COLOR_REALRED);
				//SetPlayerSkin(playerid, 294); - Commented by Voltage
				AdminMode[playerid] = Create3DTextLabel("{FFFF00}Administrator on duty!\n{FF1515}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;
}
Thank you very much!!!
Reply


Messages In This Thread
Create3Dtext to player(+rep) - by ChristianIvann09 - 08.04.2014, 05:07
Re: Create3Dtext to player(+rep) - by iBanner - 08.04.2014, 05:38
Re: Create3Dtext to player(+rep) - by ChristianIvann09 - 08.04.2014, 06:45
Re: Create3Dtext to player(+rep) - by ChuckyBabe - 08.04.2014, 06:47
Re: Create3Dtext to player(+rep) - by ChristianIvann09 - 08.04.2014, 07:05
Re: Create3Dtext to player(+rep) - by Stanford - 08.04.2014, 09:32
Re: Create3Dtext to player(+rep) - by Stanford - 08.04.2014, 09:36
Re: Create3Dtext to player(+rep) - by SickAttack - 09.04.2014, 02:50
Re: Create3Dtext to player(+rep) - by Hanuman - 09.04.2014, 06:04
Re: Create3Dtext to player(+rep) - by Threshold - 09.04.2014, 08:38

Forum Jump:


Users browsing this thread: 1 Guest(s)