16.09.2010, 17:59
Quote:
pawn Код:
|
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '@')
{
new Message[128];
if(sscanf(params, "s[128]", Message))
{
if( PlayerStatistics[playerid][pAdminLevel] >= 1)
{
SendClientMessage( playerid, COLOR_WHITE, "SYNTAX: @ [message]" );
}
}
else
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnectedEx(i))
{
if(PlayerStatistics[i][pAdminLevel] >= 1)
{
new admtext[128], admin_string[128], name[MAX_PLAYER_NAME];
name = GetName(playerid);
if(PlayerStatistics[i][pAdminLevel] == 5) { admtext = "Server Owner"; }
else if(PlayerStatistics[i][pAdminLevel] == 4) { admtext = "Server Developer"; }
else if(PlayerStatistics[i][pAdminLevel] == 3) { admtext = "Lead Admin"; }
else if(PlayerStatistics[i][pAdminLevel] == 2) { admtext = "Game Admin"; }
else if(PlayerStatistics[i][pAdminLevel] == 1) { admtext = "Moderator"; }
format(admin_string, sizeof( admin_string ), "[%s] %s(%d): %s", admtext, name, playerid, Message );
SendAdminMessage(COLOR_LIGHTBLUE, admin_string, 1);
print(admin_string);
}
}
}
}
}
else
{
return 1;
}
return 1;
}