21.10.2011, 14:08
What do you mean by "anounce"? Here is what I understood, using y_commands:
Using "/announce Hello" it will display for all players the message "PlayerName has announced: Hello" for 4500 milliseconds in this style:
pawn Код:
YCMD:announce(playerid, params[], help)
{
if ( help ) return SendClientMessage( playerid, -1, #Announce something );
if ( isnull ( params ) ) return SendClientMessage( playerid, -1, #Usage /announce <text> );
new
_Str[ 128 ], P_NAME[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, P_NAME, MAX_PLAYER_NAME );
for ( new i = 0; i != MAX_PLAYERS; ++i )
{
format( _Str, sizeof ( _Str ), "%s has announced: ~n~%s", P_NAME, params );
GameTextForPlayer( i, _Str, 4500, 3 );
}
return true;
}