hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.08. 22:03



Jelenlévő felhasználók

Jelenleg 261 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 261 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: nincs regisztrált felhasználó az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 8 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 10:19 
Helllo lehet-e langot színezni és ha igen hogy mert nekem így nem sikerült !g !y !t valaki írja már le hogyan lehet megcsinálni


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 11:13 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.12.18. 17:35
Hozzászólások: 365
Megköszönt másnak: 152 alkalommal
Megköszönték neki: 31 alkalommal
Ezt, tedd a plugin végére!
+írd át a plugin sma-t

Kód:
print_color(id, "%L", LANG_PLAYER


vagy

Kód:
ColorChat(id , GREEN, "%L", LANG_PLAYER,


SMA Forráskód: [ Mindet kijelol ]
  1. stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) {
  2.  
  3. new msg[191], players[32], count = 1;
  4. vformat(msg, sizeof msg - 1, string, 3);
  5.  
  6. replace_all(msg,190,"!g","^4");
  7. replace_all(msg,190,"!y","^1");
  8. replace_all(msg,190,"!t","^3");
  9.  
  10. if(id)
  11. players[0] = id;
  12. else
  13. get_players(players,count,"ch");
  14.  
  15. new index;
  16. for (new i = 0 ; i < count ; i++)
  17. {
  18. index = players[i];
  19. message_begin(MSG_ONE_UNRELIABLE, say_text,_, index);
  20. write_byte(index);
  21. write_string(msg);
  22. message_end();
  23. }
  24.  
  25. }

_________________
Ha segítettem használd a gombot!

Kép
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 12:12 
Én nem ilyen re gondoltam!
Pl:

[hu]
HELP_COMS = AMX Mod X segitseg: Parancsok
HELP_ENTRIES = Bejegyzes %d - %d of %d
HELP_USE_MORE = Irj 'amx_help %d' -t tobbhoz
HELP_USE_BEGIN = Irj 'amx_help 1' -t az elso oldalhoz
TYPE_HELP = Irj 'amx_help' -t a konzolba hogy lathasd a parancsokat
TIME_INFO_1 = Hatralevo ido: %d:%02d perc. kovetkezo palya: %s
TIME_INFO_2 = Nincs idohatar. A kovetkezo palya: %s


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 12:43 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.12.18. 17:35
Hozzászólások: 365
Megköszönt másnak: 152 alkalommal
Megköszönték neki: 31 alkalommal
Most próbáld meg színezni a langot!

SMA Forráskód: [ Mindet kijelol ]
  1. /* AMX Mod X
  2. * Admin Help Plugin
  3. *
  4. * by the AMX Mod X Development Team
  5. * originally developed by tcquest78
  6. *
  7. * This file is part of AMX Mod X.
  8. *
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at
  13. * your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software Foundation,
  22. * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. * In addition, as a special exception, the author gives permission to
  25. * link the code of this program with the Half-Life Game Engine ("HL
  26. * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  27. * L.L.C ("Valve"). You must obey the GNU General Public License in all
  28. * respects for all of the code used other than the HL Engine and MODs
  29. * from Valve. If you modify this file, you may extend this exception
  30. * to your version of the file, but you are not obligated to do so. If
  31. * you do not wish to do so, delete this exception statement from your
  32. * version.
  33. */
  34.  
  35. #include <amxmodx>
  36. #include <colorchat>
  37.  
  38. #define DISPLAY_MSG // Comment to disable message on join
  39. #define HELPAMOUNT 10 // Number of commands per page
  40.  
  41. public plugin_init()
  42. {
  43. register_plugin("Admin Help", AMXX_VERSION_STR, "AMXX Dev Team")
  44. register_dictionary("adminhelp.txt")
  45. register_concmd("amx_help", "cmdHelp", 0, "<page> [nr of cmds (only for server)] - displays this help")
  46. }
  47.  
  48. #if defined DISPLAY_MSG
  49. public client_putinserver(id)
  50. {
  51. if (is_user_bot(id))
  52. return
  53.  
  54. set_task(15.0, "dispInfo", id)
  55. }
  56.  
  57. public client_disconnect(id)
  58. {
  59. remove_task(id)
  60. }
  61. #endif
  62.  
  63. public cmdHelp(id, level, cid)
  64. {
  65. new arg1[8], flags = get_user_flags(id)
  66. new start = read_argv(1, arg1, charsmax(arg1)) ? str_to_num(arg1) : 1
  67. new lHelpAmount = HELPAMOUNT
  68.  
  69. // HACK: ADMIN_ADMIN is never set as a user's actual flags, so those types of commands never show
  70. if (flags > 0 && !(flags & ADMIN_USER))
  71. {
  72. flags |= ADMIN_ADMIN;
  73. }
  74.  
  75. if (id == 0 && read_argc() == 3)
  76. lHelpAmount = read_argv(2, arg1, charsmax(arg1)) ? str_to_num(arg1) : HELPAMOUNT
  77.  
  78. if (--start < 0)
  79. start = 0
  80.  
  81. new clcmdsnum = get_concmdsnum(flags, id)
  82.  
  83. if (start >= clcmdsnum)
  84. start = clcmdsnum - 1
  85.  
  86. ColorChat(id , NORMAL, "^n----- %L -----", id, "HELP_COMS")
  87.  
  88. new info[128], cmd[32], eflags
  89. new end = start + lHelpAmount // HELPAMOUNT
  90.  
  91. if (end > clcmdsnum)
  92. end = clcmdsnum
  93.  
  94. for (new i = start; i < end; i++)
  95. {
  96. get_concmd(i, cmd, charsmax(cmd), eflags, info, charsmax(info), flags, id)
  97. ColorChat(id , NORMAL, "%3d: %s %s", i + 1, cmd, info)
  98. }
  99.  
  100. ColorChat(id , NORMAL, "----- %L -----", id, "HELP_ENTRIES", start + 1, end, clcmdsnum)
  101.  
  102. if (end < clcmdsnum)
  103. ColorChat(id , NORMAL, "----- %L -----", id, "HELP_USE_MORE", end + 1)
  104. else
  105. ColorChat(id , NORMAL, "----- %L -----", id, "HELP_USE_BEGIN")
  106.  
  107. return PLUGIN_HANDLED
  108. }
  109.  
  110. #if defined DISPLAY_MSG
  111. public dispInfo(id)
  112. {
  113. ColorChat(id , NORMAL, "%L", id, "TYPE_HELP")
  114.  
  115. static amx_nextmap, mp_timelimit = 0
  116. if( !mp_timelimit )
  117. {
  118. amx_nextmap = get_cvar_pointer("amx_nextmap")
  119. mp_timelimit = get_cvar_pointer("mp_timelimit")
  120. }
  121.  
  122. new nextmap[32]
  123. if( amx_nextmap )
  124. {
  125. get_pcvar_string(amx_nextmap, nextmap, charsmax(nextmap))
  126. }
  127.  
  128. if (get_pcvar_float(mp_timelimit))
  129. {
  130. new timeleft = get_timeleft()
  131.  
  132. if (timeleft > 0)
  133. {
  134. ColorChat(id , NORMAL, "%L", id, "TIME_INFO_1", timeleft / 60, timeleft % 60, nextmap)
  135. } else if (amx_nextmap) {
  136. ColorChat(id , NORMAL, "%L", id, "TIME_INFO_2", nextmap)
  137. }
  138. }
  139. }
  140. #endif
  141. stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) {
  142.  
  143. new msg[191], players[32], count = 1;
  144. vformat(msg, sizeof msg - 1, string, 3);
  145.  
  146. replace_all(msg,190,"!g","^4");
  147. replace_all(msg,190,"!y","^1");
  148. replace_all(msg,190,"!t","^3");
  149.  
  150. if(id)
  151. players[0] = id;
  152. else
  153. get_players(players,count,"ch");
  154.  
  155. new index;
  156. for (new i = 0 ; i < count ; i++)
  157. {
  158. index = players[i];
  159. message_begin(MSG_ONE_UNRELIABLE, say_text,_, index);
  160. write_byte(index);
  161. write_string(msg);
  162. message_end();
  163. }
  164.  
  165. }

_________________
Ha segítettem használd a gombot!

Kép
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 12:45 
Beckx írta:
Most próbáld meg színezni a langot!

SMA Forráskód: [ Mindet kijelol ]
  1. /* AMX Mod X
  2. * Admin Help Plugin
  3. *
  4. * by the AMX Mod X Development Team
  5. * originally developed by tcquest78
  6. *
  7. * This file is part of AMX Mod X.
  8. *
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at
  13. * your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software Foundation,
  22. * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  23. *
  24. * In addition, as a special exception, the author gives permission to
  25. * link the code of this program with the Half-Life Game Engine ("HL
  26. * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  27. * L.L.C ("Valve"). You must obey the GNU General Public License in all
  28. * respects for all of the code used other than the HL Engine and MODs
  29. * from Valve. If you modify this file, you may extend this exception
  30. * to your version of the file, but you are not obligated to do so. If
  31. * you do not wish to do so, delete this exception statement from your
  32. * version.
  33. */
  34.  
  35. #include <amxmodx>
  36. #include <colorchat>
  37.  
  38. #define DISPLAY_MSG // Comment to disable message on join
  39. #define HELPAMOUNT 10 // Number of commands per page
  40.  
  41. public plugin_init()
  42. {
  43. register_plugin("Admin Help", AMXX_VERSION_STR, "AMXX Dev Team")
  44. register_dictionary("adminhelp.txt")
  45. register_concmd("amx_help", "cmdHelp", 0, "<page> [nr of cmds (only for server)] - displays this help")
  46. }
  47.  
  48. #if defined DISPLAY_MSG
  49. public client_putinserver(id)
  50. {
  51. if (is_user_bot(id))
  52. return
  53.  
  54. set_task(15.0, "dispInfo", id)
  55. }
  56.  
  57. public client_disconnect(id)
  58. {
  59. remove_task(id)
  60. }
  61. #endif
  62.  
  63. public cmdHelp(id, level, cid)
  64. {
  65. new arg1[8], flags = get_user_flags(id)
  66. new start = read_argv(1, arg1, charsmax(arg1)) ? str_to_num(arg1) : 1
  67. new lHelpAmount = HELPAMOUNT
  68.  
  69. // HACK: ADMIN_ADMIN is never set as a user's actual flags, so those types of commands never show
  70. if (flags > 0 && !(flags & ADMIN_USER))
  71. {
  72. flags |= ADMIN_ADMIN;
  73. }
  74.  
  75. if (id == 0 && read_argc() == 3)
  76. lHelpAmount = read_argv(2, arg1, charsmax(arg1)) ? str_to_num(arg1) : HELPAMOUNT
  77.  
  78. if (--start < 0)
  79. start = 0
  80.  
  81. new clcmdsnum = get_concmdsnum(flags, id)
  82.  
  83. if (start >= clcmdsnum)
  84. start = clcmdsnum - 1
  85.  
  86. ColorChat(id , NORMAL, "^n----- %L -----", id, "HELP_COMS")
  87.  
  88. new info[128], cmd[32], eflags
  89. new end = start + lHelpAmount // HELPAMOUNT
  90.  
  91. if (end > clcmdsnum)
  92. end = clcmdsnum
  93.  
  94. for (new i = start; i < end; i++)
  95. {
  96. get_concmd(i, cmd, charsmax(cmd), eflags, info, charsmax(info), flags, id)
  97. ColorChat(id , NORMAL, "%3d: %s %s", i + 1, cmd, info)
  98. }
  99.  
  100. ColorChat(id , NORMAL, "----- %L -----", id, "HELP_ENTRIES", start + 1, end, clcmdsnum)
  101.  
  102. if (end < clcmdsnum)
  103. ColorChat(id , NORMAL, "----- %L -----", id, "HELP_USE_MORE", end + 1)
  104. else
  105. ColorChat(id , NORMAL, "----- %L -----", id, "HELP_USE_BEGIN")
  106.  
  107. return PLUGIN_HANDLED
  108. }
  109.  
  110. #if defined DISPLAY_MSG
  111. public dispInfo(id)
  112. {
  113. ColorChat(id , NORMAL, "%L", id, "TYPE_HELP")
  114.  
  115. static amx_nextmap, mp_timelimit = 0
  116. if( !mp_timelimit )
  117. {
  118. amx_nextmap = get_cvar_pointer("amx_nextmap")
  119. mp_timelimit = get_cvar_pointer("mp_timelimit")
  120. }
  121.  
  122. new nextmap[32]
  123. if( amx_nextmap )
  124. {
  125. get_pcvar_string(amx_nextmap, nextmap, charsmax(nextmap))
  126. }
  127.  
  128. if (get_pcvar_float(mp_timelimit))
  129. {
  130. new timeleft = get_timeleft()
  131.  
  132. if (timeleft > 0)
  133. {
  134. ColorChat(id , NORMAL, "%L", id, "TIME_INFO_1", timeleft / 60, timeleft % 60, nextmap)
  135. } else if (amx_nextmap) {
  136. ColorChat(id , NORMAL, "%L", id, "TIME_INFO_2", nextmap)
  137. }
  138. }
  139. }
  140. #endif
  141. stock client_printc(const id, const string[], {Float, Sql, Resul,_}:...) {
  142.  
  143. new msg[191], players[32], count = 1;
  144. vformat(msg, sizeof msg - 1, string, 3);
  145.  
  146. replace_all(msg,190,"!g","^4");
  147. replace_all(msg,190,"!y","^1");
  148. replace_all(msg,190,"!t","^3");
  149.  
  150. if(id)
  151. players[0] = id;
  152. else
  153. get_players(players,count,"ch");
  154.  
  155. new index;
  156. for (new i = 0 ; i < count ; i++)
  157. {
  158. index = players[i];
  159. message_begin(MSG_ONE_UNRELIABLE, say_text,_, index);
  160. write_byte(index);
  161. write_string(msg);
  162. message_end();
  163. }
  164.  
  165. }

Ha eszt berakom akkor tudom szinezni a langot?


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 12:47 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.12.18. 17:35
Hozzászólások: 365
Megköszönt másnak: 152 alkalommal
Megköszönték neki: 31 alkalommal
Szerintem működni-e kell, próbáld meg!
Ha nem, van még egy megoldásom!

_________________
Ha segítettem használd a gombot!

Kép
KépKép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 14:15 
Offline
Beavatott

Csatlakozott: 2014.05.23. 18:32
Hozzászólások: 68
Megköszönt másnak: 88 alkalommal
Megköszönték neki: 2 alkalommal
Müködik? [felso]:shock:[/felso]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Lang filek szinezése
HozzászólásElküldve: 2014.10.23. 14:32 
spice írta:
Müködik? [felso]:shock:[/felso]

nem


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 8 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 22 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole