/announce command
#2

What do you mean by "anounce"? Here is what I understood, using y_commands:
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;
}
Using "/announce Hello" it will display for all players the message "PlayerName has announced: Hello" for 4500 milliseconds in this style:

Reply


Messages In This Thread
/announce command - by aminj - 21.10.2011, 14:01
Re: /announce command - by SmiT - 21.10.2011, 14:08

Forum Jump:


Users browsing this thread: 1 Guest(s)