Raised This Month: $49 Target: $400
 12% 

[Req] Multi Lang Perm Hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Location: Istanbul
Old 05-15-2019 , 15:55   [Req] Multi Lang Perm Hud
Reply With Quote #1

How can i make this with a lang file ?
PHP Code:
#include <amxmodx>

#define PLUGIN_NAME "Permanent HUD Message"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "OciXCrom"

new g_iObject

// ???? ? ???????????.
new const g_szMessage[] = "MENU ICIN [N] BASINIZ!"

public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
    
    
// ???? ? ???????, ????? ?? ????? HUD ???????????.
    
g_iObject CreateHudSyncObj()
    
    
// ???????? ?????? (task), ????? ?? ?? ????????? ????????? displayMessage() ???? 1 ???????.
    
set_task(1.0"displayMessage"___"b")
}

public 
displayMessage()
{
    
// ???????? ??????????? ?? ???????????.
    
set_hudmessage(025500.020.200.11.00.10.1, -1)
    
    
// ????????? ??????????? ?? ?????? ??????.
    
ShowSyncHudMsg(0g_iObjectg_szMessage)

Snake. is offline
Send a message via Skype™ to Snake.
raizo11
Senior Member
Join Date: Dec 2013
Location: Romania (Constanța)
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 MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Snake.
Senior Member
Join Date: Jul 2017
Location: Istanbul
Old 05-15-2019 , 19:30   Re: [Req] Multi Lang Perm Hud
Reply With Quote #3

Thnx
Snake. is offline
Send a message via Skype™ to Snake.
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:58.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode