#1

hi guys i need help i want to send this message to all player in server.i try to make but its not working.i m noob at scripting

Код:
COMMAND:aod(playerid, params[])
{
	if(playerData[playerid][playerLoggedIn])
	{
		if(playerData[playerid][playerLevel] >= 1)
		{
			// If AdminDuty is 1
			if (!playerData[playerid][playerAdminDuty])
			{
				SendClientMessage(playerid, COLOR_WHITE, "{OOFFOO}[ADMIN] {FFFFFF}You're now an on duty Administrator.");
				playerData[playerid][playerAdminDuty] = true;
				playerData[playerid][playerAdminLabel] = Create3DTextLabel("Admin on Duty", 0x00ff00ff, 30.0, 40.0, 50.0, 60.0, -1, 1);
				Attach3DTextLabelToPlayer(playerData[playerid][playerAdminLabel], playerid, 0.0, 0.0, 0.4);

				// Give them infinite health.
				SetPlayerHealth(playerid, 9999999);
				SetPlayerColor(playerid, 0x00ff00);
				TextDrawShowForPlayer(playerid, Text:AdminDuty);
                           }
                        else
			{
                         SendClientMessageToAll(COLOR_WHITE,"{00FF00}[ADMIN] {FF69A6}%s is now an on duty of Administrator.For resistance use /ask!)", playerData[playerid][tempAdminName]);
		        }
       			else

			{
				// Admin is already on duty, so we'll now put them off duty
				SendClientMessage(playerid, COLOR_WHITE, "{00FF00}[ADMIN] {FFFFFF}You're now an off duty Administrator.");
				playerData[playerid][playerAdminDuty] = false;
				Delete3DTextLabel(playerData[playerid][playerAdminLabel]);
			
				// Give them default health
				SetPlayerHealth(playerid, 100);
				newPlayerColour(playerid);
				TextDrawHideForPlayer(playerid, Text:AdminDuty);
                       }


                        else
			{
                         SendClientMessageToAll(COLOR_WHITE,"{00FF00}[ADMIN] {FF69A6}%s is now an off duty of Administrator!)", playerData[playerid][tempAdminName]);
			}
		}
		else
		{
			return 0;
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_WHITE, "{B7B7B7}[SERVER] {FFFFFF}You must be logged in to use commands.");
	}
	
	return 1;
}
i just add sendclientmessagetoall part help me to fix it .
Reply


Messages In This Thread
CMD - by KNIGHT786 - 26.03.2017, 18:30
Re: CMD - by GoldenLion - 26.03.2017, 18:31
Re: CMD - by KNIGHT786 - 26.03.2017, 18:41
Re: CMD - by Unte99 - 26.03.2017, 19:30
Re: CMD - by TopShooter2 - 26.03.2017, 20:17
Re: CMD - by Variable™ - 26.03.2017, 20:44
Re: CMD - by Kane - 26.03.2017, 21:37
Re: CMD - by Variable™ - 26.03.2017, 21:58
Re: CMD - by TopShooter2 - 26.03.2017, 22:35
Re: CMD - by KNIGHT786 - 27.03.2017, 08:42

Forum Jump:


Users browsing this thread: 1 Guest(s)