#include <a_samp>
#include <rega>


//===========[Текст Админам]================
stock ToAdministration(color,const string[])
{
	for(new i; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(Player[i][pAdmin] >= 1)
			{
				SendClientMessage(i, color, string);
			}
		}
	}
	return 1;
}

//==============[Текст Фракции]===============
stock ToJob(job, color, const string[])
{
	for(new i; i < MAX_PLAYERS; i++)
	{
		if(Player[i][pMember] == job)
		{
			SendClientMessage(i, color, string);
		}
	}
}


//===========[Ручные тексты]=====================

stock SendPlayerFormattedText(playerid, const str[], define)
{
	new tmpbuf[256];
	format(tmpbuf, sizeof(tmpbuf), str, define);
	SendClientMessage(playerid, 0xFF004040, tmpbuf);
}

stock SendAllFormattedText(playerid, const str[], define)
{
	new tmpbuf[256];
	format(tmpbuf, sizeof(tmpbuf), str, define);
	SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}


//==============[Текст простым игрокам]===========
stock SendToPlayers(color,const string[])
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if (Player[i][pAdmin] == 0)
			{
				SendClientMessage(i, color, string);
			}
		}
	}
	return 1;
}

