Raised This Month: $32 Target: $400
 8% 

I have a doubt about TE_TEXTMESSAGE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 05-13-2011 , 12:02   I have a doubt about TE_TEXTMESSAGE
Reply With Quote #1

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) == )
    {
        
get_msg_arg_string18szMessagecharsmax(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(18szMessagecharsmax(szMessage)) )
    {
        if( 
equali(szMessage"MyString") )
        {
            
set_msg_arg_string(18"MyString2")
        }
    } 
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode