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;
}