Raised This Month: $ Target: $400
 0% 

Solved Lang


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ludak
Member
Join Date: Oct 2014
Old 05-15-2020 , 04:45   Lang
Reply With Quote #1

Greetings,
I have a question.
Can language files be reloaded during the game and take an effect immediately?

Thank you.

Last edited by Ludak; 05-15-2020 at 17:59.
Ludak is offline
elmedin
Senior Member
Join Date: Nov 2013
Old 05-15-2020 , 12:36   Re: Lang
Reply With Quote #2

As far as i know the moment u launch ur server/game the lang files will be read and will be stored in memory they wont be read again if u change something unless u change map. I might be wrong but this is what i know
elmedin is offline
Ludak
Member
Join Date: Oct 2014
Old 05-15-2020 , 17:59   Re: Lang
Reply With Quote #3

Tried with register_lang
It works.
Ludak is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-15-2020 , 20:51   Re: Lang
Reply With Quote #4

When did you call it? Usually that is called in plugin_init() which only runs at the beginnig of the map when the plugin is loaded.
__________________
fysiks is offline
Ludak
Member
Join Date: Oct 2014
Old 05-16-2020 , 10:26   Re: Lang
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
When did you call it? Usually that is called in plugin_init() which only runs at the beginnig of the map when the plugin is loaded.
I have it there, but I have used it in a native, since I have some functionality which adds new phrases to lang when players create their stuff.
It works like a charm.
Ludak is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-19-2020 , 06:21   Re: Lang
Reply With Quote #6

I don't know if this will work, but it would refresh your lang file every 20.0 seconds:
PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init( )
{
    
register_plugin"Refresh Lang File""0.1""New plugin" )
    
    
set_task(20.0"task_refresh"21412321_,_"b")
}

public 
task_refresh( )
{
    
register_dictionary("file.txt")
    return 
PLUGIN_CONTINUE

__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
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 14:15.


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