Tryed this but dont work correctly.
Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_plugin("Test", "Crazy", "test");
register_forward(FM_PlayerPreThink, "fw_PlayerPreThink");
}
public fw_PlayerPreThink(id)
{
if (!is_user_alive(id)) return;
new button = pev(id, pev_button);
if (button & IN_USE)
{
create_bar(id, 2);
}
}
stock create_bar(id, scale)
{
message_begin(MSG_ONE, get_user_msgid("BarTime"), _, id)
write_short(scale)
message_end()
}
__________________