Page 1 of 1

multi lang

Posted: 2012 Jul 30 14:27
by GhostMan
http://forums.alliedmods.net/attachment ... 1343650868

Nelabai įsivaizduoju kaip šitam meniu turėtų atrodyt multi-lingual. Visą kitą pasidariau, ten daug mokslo nereikia, bet problema man su meniu

Code: Select all

Challenge(challenger, challenged) {    g_challenger = challenger    g_challenged = challenged    g_challenging = true    new challenger_name[32], challenged_name[32]    get_user_name(challenger, challenger_name, 31)    get_user_name(challenged, challenged_name, 31)     client_print(challenger, print_chat, "%L", challenger, "YOU_CHALLANGED", challenged_name, DECIDESECONDS)     new menu[1024], keys = MENU_KEY_1 | MENU_KEY_2    format(menu, 1023, "You are challenged by %s to a knife duel!^n^nWhat will it be? You have %d seconds to answer!^n^n\y1\w. Bring it on!^n\y2\w. No, I'd rather use my boomstick!", challenger_name, DECIDESECONDS)    show_menu(challenged, keys, menu, DECIDESECONDS, "JGHG's automatic knife duel")    set_task(float(DECIDESECONDS), "timed_toolate", TASKID_CHALLENGING)}  

Re: multi lang

Posted: 2012 Aug 02 14:04
by aaarnas
Tai pvz reikia pakeisti: Bring it on!
Stringe vietoje jo rašai %L
O lang faile:
BRING_IT_ON = Bring it on!
parametruose id (ar LANG_PLAYER, pagal tai kam rodoma), "BRING_IT_ON".

Re: multi lang

Posted: 2012 Aug 02 14:37
by GhostMan
Tai kai su paprastu client_print tai viskas ok, bet aš nesuprantu kaip daryt, kur yra tas "format"

Re: multi lang

Posted: 2012 Aug 02 16:09
by aaarnas
Lygiai taip pat. Client_print irgi taip pat formatuojamas.
Ten kur yra tas simbolis %L, tai vietoje jo tekstą įterpia.
ttt %L ttt = ttt Bring it on! ttt

Re: multi lang

Posted: 2012 Aug 02 16:25
by GhostMan
Vistiek man nesigauna.