Bueno es una simple tonteria, pero igual si alguien quiere responder bien sino pasen del post.
Cual de los 3 stock, es mejor.
PHP Code:
stock ChatColor( id, szInput[ ], any:... )
{
static iMsgId[ 191 ];
vformat( iMsgId, charsmax( iMsgId ), szInput, 3 );
replace_all( iMsgId, charsmax( iMsgId ), "!y", "^1" ); // Default Color
replace_all( iMsgId, charsmax( iMsgId ), "!g", "^4" ); // Green Color
replace_all( iMsgId, charsmax( iMsgId ), "!team", "^3" ); // Team Color
new iCount = 1, iPlayers[ 32 ];
if( id )
iPlayers[ 0 ] = id;
else
get_players( iPlayers, iCount, "ch" );
for( new i = 0; i < iCount; i++ )
{
if( is_user_connected( iPlayers[ i ] ) )
{
message_begin( MSG_ONE_UNRELIABLE, g_iMsgSayText, _, iPlayers[ i ] );
write_byte( iPlayers[ i ] );
write_string( iMsgId );
message_end( );
}
}
}
PHP Code:
stock ChatColor( id, szInput[ ], any:... )
{
static iMsgId[ 191 ];
vformat( iMsgId, charsmax( iMsgId ), szInput, 3 );
replace_all( iMsgId, charsmax( iMsgId ), "!y", "^1" ); // Default Color
replace_all( iMsgId, charsmax( iMsgId ), "!g", "^4" ); // Green Color
replace_all( iMsgId, charsmax( iMsgId ), "!team", "^3" ); // Team Color
new iCount = 1, iPlayers[ 32 ];
if( id )
iPlayers[ 0 ] = id;
else
get_players( iPlayers, iCount, "ch" );
{
for( new i = 0; i < iCount; i++ )
{
if( is_user_connected( iPlayers[ i ] ) )
{
message_begin( MSG_ONE_UNRELIABLE, g_iMsgSayText, _, iPlayers[ i ] );
write_byte( iPlayers[ i ] );
write_string( iMsgId );
message_end( );
}
}
}
}
PHP Code:
stock ChatColor( id, szInput[ ], any:... )
{
static iMsgId[ 191 ];
vformat( iMsgId, charsmax( iMsgId ), szInput, 3 );
replace_all( iMsgId, charsmax( iMsgId ), "!y", "^1" ); // Default Color
replace_all( iMsgId, charsmax( iMsgId ), "!g", "^4" ); // Green Color
replace_all( iMsgId, charsmax( iMsgId ), "!team", "^3" ); // Team Color
new iCount = 1, iPlayers[ 32 ];
if( id )
iPlayers[ 0 ] = id;
else
{
get_players( iPlayers, iCount, "ch" );
{
for( new i = 0; i < iCount; i++ )
{
if( is_user_connected( iPlayers[ i ] ) )
{
message_begin( MSG_ONE_UNRELIABLE, g_iMsgSayText, _, iPlayers[ i ] );
write_byte( iPlayers[ i ] )
write_string( iMsgId )
message_end( );
}
}
}
}
}
EDIT: Para que sirve esto:
any:...
__________________