Code:
#include <amxmodx>
new g_iObject
public plugin_init()
{
register_dictionary("test.txt")
g_iObject = CreateHudSyncObj()
set_task(1.0, "displayMessage", _, _, _, "b")
}
new const LANG_FILE[][] =
{
"[en]",
"ADVERTISMENT_ONE = ^1Put ^3message^1 here ^4please^1!"
}
public plugin_precache()
{
if(!file_exists("addons/amxmodx/data/lang/test.txt"))
{
for(new i=0;i< sizeof LANG_FILE;i++)
{
write_file("addons/amxmodx/data/lang/test.txt", LANG_FILE[i]);
}
}
}
public displayMessage()
{
set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 0.1, 1.0, 0.1, 0.1, -1)
ShowSyncHudMsg(0, g_iObject, "%L", LANG_PLAYER, "ADVERTISMENT_ONE")
}