Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSProblem in Lang Message


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
For some reason, it only shows message for en users. My lang is tr but it still shows en even though i set my lang as tr. Any problem in this code?

PHP Code:

#include <amxmodx>
#include <colorchat>
 
#define PLUGIN "Lang Message"
#define VERSION "1.0"
#define AUTOR   "raizo"


new AdvTime

new const LANG_FILE[][] =
{
    
"[en]",
    
"ADVERTISMENT_ONE = ^1Put ^3message^1 here ^4please ONE ^1!",
    
"ADVERTISMENT_TWO = ^1Put ^3here^1 message ^4please TWO ^1!",
    
"ADVERTISMENT_THREE = ^1Put ^3message^1 here ^4please THREE^1!",
    
"ADVERTISMENT_FOUR = ^1Put ^3here^1 message ^4please FOUR^1!",
    
"ADVERTISMENT_FIVE = ^1Put ^3message^1 here ^4please FIVE^1!",
    
"ADVERTISMENT_SIX = ^1Put ^3here^1 message ^4please SIX^1!",
    
"ADVERTISMENT_SEVEN = ^1Put ^3message^1 here ^4please SEVEN^1!",
    
"ADVERTISMENT_EIGHT = ^1Put ^3here^1 message ^4please EIGHT^1!",
    
"ADVERTISMENT_NINE = ^1Put ^3message^1 here ^4please NINE^1!",
    
"ADVERTISMENT_TEN = ^1Put ^3here^1 message ^4please TEN^1!"
}

new const 
LANG_FILE_PREFIXES[][] =
{
    
"ADVERTISMENT_ONE",
    
"ADVERTISMENT_TWO",
    
"ADVERTISMENT_THREE",
    
"ADVERTISMENT_FOUR",
    
"ADVERTISMENT_FIVE",
    
"ADVERTISMENT_SIX",
    
"ADVERTISMENT_SEVEN",
    
"ADVERTISMENT_EIGHT",
    
"ADVERTISMENT_NINE",
    
"ADVERTISMENT_TEN"

}

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTOR);

    
AdvTime register_cvar("amx_messageone","60.0");
   
    
set_task(get_pcvar_float(AdvTime), "Advertisment");
 
    
register_dictionary("lang_messages.txt")
}

public 
plugin_precache()
{  
    if(!
file_exists("addons/amxmodx/data/lang/lang_messages.txt"))
    {
        for(new 
i=0;isizeof LANG_FILE;i++)
        {
            
write_file("addons/amxmodx/data/lang/lang_messages.txt"LANG_FILE[i]);
        }
    }
   
}

public 
Advertisment()ColorChat(0GREEN"^3[^4Lang Messages^3]^1 %L"LANG_PLAYERLANG_FILE_PREFIXES[random(sizeof(LANG_FILE_PREFIXES))] ), set_task(get_pcvar_float(AdvTime), "Advertisment");
__________________ 

Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...