20.12.2010, 20:02
Hope it helps you abit.
pawn Код:
dcmd_a(playerid, params[])
{
new ChatMessage[128];
if(PlayerInfo[i][AdminLevel] == 0) return SendClientMessage(playerid, COLOR_YELLOW, "Suck.");
if(sscanf(params, "s", ChatMessage)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /a [message]");
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string,sizeof(string),"** ADMIN CHAT %s [ID: %d]: %s",name,playerid,ChatMessage);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][AdminLevel] >= 2)
{
SendClientMessage(i, COLOR_YELLOW, string);
PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
}
}
return 0;
}