SendAdminText
#6

goto PPC_Common.inc
replace
Код:
// This function sends the given text to all admins
SendAdminText(playerid, command[], text[])
{
	// Setup local variables
	new Name[24], Msg[128];

	// Loop through all players
	for (new i; i < MAX_PLAYERS; i++)
	{
		// Check if the player is an admin
		if (APlayerData[i][PlayerLevel] > 0)
		{
			// Get the player's name
			GetPlayerName(playerid, Name, sizeof(Name));
			// Send the given text to the admin
			format(Msg, 128, "{00FFCC}%s used: %s %s", Name, command, text);
			SendClientMessage(i, 0xFFFFFFFF, Msg);
		}
	}

	// Also log all used commands in the server.log file
	format(Msg, 128, "%s used: %s %s", Name, command, text);
	print(Msg);
}
with
Код:
// This function sends the given text to all admins
SendAdminText(playerid, command[], text[])
{
	// Setup local variables
	new Name[24], Msg[128];

	// Loop through all players
	for (new i; i < MAX_PLAYERS; i++)
	{
		// Check if the player is an admin
		if (APlayerData[i][PlayerLevel] > 5)
		{
			// Get the player's name
			GetPlayerName(playerid, Name, sizeof(Name));
			// Send the given text to the admin
			format(Msg, 128, "{00FFCC}%s used: %s %s", Name, command, text);
			SendClientMessage(i, 0xFFFFFFFF, Msg);
		}
	}

	// Also log all used commands in the server.log file
	format(Msg, 128, "%s used: %s %s", Name, command, text);
	print(Msg);
}
Reply


Messages In This Thread
SendAdminText - by steven - 20.03.2012, 14:04
Re: SendAdminText - by Roel - 20.03.2012, 14:15
Re: SendAdminText - by steven - 20.03.2012, 17:01
Re: SendAdminText - by steven - 20.03.2012, 20:19
Re: SendAdminText - by [LHT]Bally - 20.03.2012, 20:32
Re: SendAdminText - by tyler12 - 20.03.2012, 20:39

Forum Jump:


Users browsing this thread: 1 Guest(s)