Raised This Month: $ Target: $400
 0% 

change message entiny


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-13-2009 , 09:54   change message entiny
Reply With Quote #1

I hooked message like this with register_message:
PHP Code:
    message_begin(MSG_ONE,g_msgStatusIcon,_,id);
    
write_byte(1);
    
write_string("c4");
    
write_byte(0);
    
write_byte(160);
    
write_byte(0);
    
message_end(); 
I know how to change 1st parameter second and so on..

But is that possible to change who is it send to? (in this case it's ID..)



Or the only way is to block this message and send another one? bcz when I'm doing that i have my server crash with error:
"MESSAGE_END called, but message buffer from .dll had overfollowed"

here is the code:
PHP Code:
public plugin_init()
{
    
g_msgStatusIcon  get_user_msgid("StatusIcon")
    
register_message(g_msgStatusIcon,"Message_StatusIcon")
}
public 
Message_StatusIcon(msg_id,msg_dest,msg_entity)
{
    if(
g_BombStatus==BOMB_NOT || g_BombStatus==BOMB_DROPPED ||
    !
g_NewRoundRespawn)
        return 
PLUGIN_CONTINUE;

    
server_print("Message_StatusIcon")
    
    
emessage_begin(MSG_ONE,g_msgStatusIcon,_,g_BombCarrier);
    
ewrite_byte(1);
    
ewrite_string("c4");
    
ewrite_byte(0); // colour Red
    
ewrite_byte(160); // colour Green
    
ewrite_byte(0); // colour Blue
    
emessage_end();
    
    
can_plant(g_BombCarrier,1)
    
can_plant(msg_entity,0)
    
    return 
PLUGIN_HANDLED;


Last edited by Empowers; 04-13-2009 at 10:02.
Empowers is offline
Send a message via ICQ to Empowers
 


Thread Tools
Display Modes

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 02:19.


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