14.09.2012, 19:12
pawn Код:
CMD:command( playerid, params[ ] )
{
if( GetPVarInt( playerid, "Level" ) < 1 )
return SendClientMessage(playerid, 0xFFFFFFFF, "Only admins!");
if(isnull( params ))
return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /command [text]");
new
i = -1,
message[148 + MAX_PLAYER_NAME + 14 + 1]
;
GetPlayerName(playerid, message, MAX_PLAYER_NAME);
format(message, sizeof(message), "[AdminChat] %s: %s", message, params);
for( ;++i < MAX_PLAYERS; )
{
if( IsPlayerConnected( i ) && ( GetPVarInt( i , "Level" ) > 1) )
{
SendClientMessage( i, 0xFFFFFFFF, params );
}
}
return true;
}