/announce command
#1

hey guys... is there any script for /anounce command? i really need it fast :S
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)