Quote:
Originally Posted by HamletEagle
Cache get_user_msgid("SayText"). Don't re-index an array.
|
Do you mean that, it is better in this way?
PHP Code:
new g_MsgText
public plugin init()
{
g_MsgText = get_user_msgid("SayText")
}
stock print_colored ( const index, const input [ ], const any:... )
{
for ( i = 0; i < count; i ++ )
{
if ( is_user_connected ( players [ i ] ) )
{
message_begin ( MSG_ONE_UNRELIABLE, g_MsgText, _, players [ i ] )
write_byte ( players [ i ] )
write_string ( message )
message_end ( )
}
}
}