How can i put hud message color in cvar? So that i wouldn't need to recompile plugin if i want to change its collor.
PHP Code:
#include <amxmodx>
#include <amxmisc>
new const PLUGIN[] = "Connect adv"
new const VERSION[] = "1.3"
new const AUTHOR[] = "none"
new hudmessage1, HudOn, ChatOn
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
hudmessage1 = CreateHudSyncObj()
ChatOn = register_cvar("conn_chat", "1")
HudOn = register_cvar("conn_hud", "1")
register_dictionary("connrekl.txt")
}
public client_putinserver(id)
{
if(!is_user_bot(id))
{
set_task(20.0, "ShowMsg", id)
}
}
public ShowMsg(id)
{
if(get_pcvar_num(ChatOn))
{
client_print(id, print_chat, "%L", id, "REKLAMA_CHAT")
}
if(get_pcvar_num(HudOn))
{
set_hudmessage(42, 170, 42, 0.02, 0.27, 1, 0.5, 10.0)
ShowSyncHudMsg(id, hudmessage1, "%L", id, "REKLAMA_HUD")
}
}
public client_disconnect(id)
{
remove_task(id)
}