In message_const.inc:
Code:
#define TE_TEXTMESSAGE 29
// write_byte(TE_TEXTMESSAGE)
// write_byte(channel)
// write_short(x) -1 = center)
// write_short(y) -1 = center)
// write_byte(effect) 0 = fade in/fade out, 1 is flickery credits, 2 is write out (training room)
// write_byte(red) - text color
// write_byte(green)
// write_byte(blue)
// write_byte(alpha)
// write_byte(red) - effect color
// write_byte(green)
// write_byte(blue)
// write_byte(alpha)
// write_short(fadein time)
// write_short(fadeout time)
// write_short(hold time)
// [optional] write_short(fxtime) time the highlight lags behing the leading text in effect 2
// write_string(text message) 512 chars max string size
And here's the most important part.
Code:
// [optional] write_short(fxtime) time the highlight lags behing the leading text in effect 2
Considering that i'll only use set_msg_arg_string( ... ). What's better?
PHP Code:
static szMessage[512]
if( get_msg_arg_int(5) == 2 )
{
get_msg_arg_string( 18, szMessage, charsmax(szMessage) )
if( equali(szMessage, "MyString") )
{
set_msg_arg_string(18, "MyString2")
}
}
// Or
if( get_msg_args() == 18 )
{
// Same as previous.
}
// Or
// I think this is better
if( get_msg_arg_string(18, szMessage, charsmax(szMessage)) )
{
if( equali(szMessage, "MyString") )
{
set_msg_arg_string(18, "MyString2")
}
}
__________________