PHP Code:
#include <amxmodx>
#include <amxmisc>
new freq_msg;
public plugin_init() {
register_plugin("blah", "1.0", "samba")
register_cvar("hud_msg", "1.0", FCVAR_SERVER)
register_clcmd( "say /test", " hud_msg" );
freq_msg=register_cvar("freq_msg", "180")
}
public hud_msg() {
new saopshe[62]
format(saopshe,61,"- My Message -")
set_hudmessage(255,0, 0, -1.0, 0.8, 2, 0.5, 8.0, 0.2, 1.0, 4);
show_hudmessage(0, saopshe);
client_print(0, print_console, "%s", saopshe);
}
public set_msg() {
new Float:freq_im = get_pcvar_float(freq_msg);
if (freq_im > 0.0)
set_task(freq_im, "hud_msg");
return PLUGIN_HANDLED
}
so if i type in chat /test its show me hud and print console msg but why it dont show me the msg automatically?