View Single Post
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 05-15-2019 , 17:04   Re: [Req] Multi Lang Perm Hud
Reply With Quote #2

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") 
}

Last edited by raizo11; 05-15-2019 at 17:04.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11