29.05.2010, 14:12
How can I SendClientMessageToAll for the admins only?
stock MessageToAdministrators( required_level, color, const string[] )
{
foreach(Player, i)
{
if( GetPVarInt( i, "AdminLevel" ) >= required_level )
{
SendClientMessage( i, color, string );
}
}
return 1;
}
SendAdminMessage(level, color, string[]) { for(new i; i < MAX_PLAYERS; i++) { if(PlayerInfo[i][pAdmin] >= level) SendClientMessage(i, color, string); } }
SendAdminMessage(3, COLOR_RED, "Message to all admins which are level 3 or higher.");
SendAdminMessage(color, string[]) { for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerAdmin(i)) SendClientMessage(i, color, string); } }
SendAdminMessage(COLOR_RED, "Message to all RCON admins.");