Set_task is uber cheap since you are forced to at least 0.1 seconds.
Found a solution already. Using the example from above:
Code:
public plugin_init() {
register_message(somemsg, "msg_hook");
}
public msg_hook(msg_id, msg_dest, id) {
// Do or don't do anything with the original message here
for(new i = 64; i <= 100; i++) { // In HL, 64 to 100 is the range of all messages
msg_state[i] = get_msg_block(i);
set_msg_block(i, BLOCK_SET);
}
// Do stuff
for(new i = 64; i <= 100; i++) {
set_msg_block(i, msg_state[i]);
}
// Do or don't do anything with the original message here
}
Works like a charm. Lucky enough I need no message calls there.
I only need to block message calls caused by some of the stuff done there.
__________________