hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.23. 19:51



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Bing [Bot], Majestic-12 [Bot] 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  [ 4 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Chat üzenetek láthatósága.
HozzászólásElküldve: 2015.04.04. 13:01 
Offline
Senior Tag

Csatlakozott: 2013.07.29. 13:15
Hozzászólások: 233
Megköszönt másnak: 125 alkalommal
Sziasztok. Nekem egy olyan plugin kellene amivel midenki látja midenki írását a chatbe a halot látja az élőt hogy mitír és fordítva
Midenki lássa midenkinek azt hogy mitért és midét lehesen látni.
Ami hlmodon megtalálható az nemjó!!!!!!!!
Aki írna egy újat ami müködik azt nagyon megköszönném!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Chat üzenetek láthatósága.
HozzászólásElküldve: 2015.04.04. 13:11 
Offline
Újonc

Csatlakozott: 2015.04.01. 16:46
Hozzászólások: 8
Megköszönték neki: 1 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. /*
  2. AllChat v1.1
  3. Copyright (C) 2006-2007 Ian (Juan) Cammarata
  4.  
  5. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
  6.  
  7. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  8.  
  9. You should have received a copy of the GNU General Public License along with this program; go to http://www.opensource.org/licenses/gpl-license.php
  10.  
  11.  
  12. Description:
  13. This plugin does for chat what sv_alltalk does for voice. Dead and alive and spectating players can all see each others chat messages. Team chat is still only visible among your team, but with no regard for whether you are dead or alive. By default this plugin works depending on whether or not sv_alltalk is on. It can be forced to be on all the time, as well as setting custom colors for messages that come from admins.
  14.  
  15.  
  16. See it in Action:
  17. Use the following link to find a server that's running this plugin:
  18.  
  19.  
  20. Cvars:
  21. *First value is default
  22.  
  23. sv_allchat <1|2|0>
  24. 1 - Dependent on sv_alltalk
  25. 2 - Always active
  26. 0 - Disabled
  27.  
  28. ac_namecolor <0|1|2>
  29. ac_msgcolor <1|2|0>
  30. 0 - Team color
  31. 1 - Green
  32. 2 - White
  33.  
  34. ac_hidestatus <0|1>
  35. 0 = Show dead/spec status.
  36. 1 = Hide status.
  37.  
  38. ac_teamchat <0|1>
  39. 0 = Dead and living can't team chat.
  40. 1 = Dead and living can team chat.
  41.  
  42.  
  43. Change Log:
  44. Key (+ added | - removed | f fixed | c changed)
  45.  
  46. v1.1 (Aug 14, 2007)
  47. +: Cvar ac_hidestatus to show/hide dead/spec status.
  48. +: Cvar ac_teamchat to enable/disable all chat for team chat.
  49.  
  50. v1.0.1 (June 28, 2007)
  51. f: Replicated messages are now correctly collored based on admin flag.
  52.  
  53. v1.0 (June 26, 2007)
  54. !Complete rewrite.
  55. f: No longer interferes with other plugins.
  56.  
  57. v0.5 (June 21, 2007)
  58. +: Tracking cvar.
  59. c: Uses cvar pointers now.
  60.  
  61. v0.4 (??? ??, 2006) by Ian Cammarata & Dontask
  62. f : Blocking text messages conataining only spaces.
  63.  
  64. v0.3 (June 23, 2006) by Ian Cammarata & Dontask
  65. + : Added multiple values to sv_allchat. See details in Cvar section.
  66. + : Added cvar ac_namecolor to change the color displayed on admins names.
  67. + : Added cvar ac_msgcolor to change the color displayed on admins msgs.
  68. + : Added colored messages even if sv_allchat is set to 1 while alltalk is set to 0.
  69. + : Added equivalent functionality for team say.
  70.  
  71. v0.2.1 (??? ??, 2006) by Ian Cammarata & Dontask
  72. f : Fixed formatting color issues.
  73.  
  74. v0.2 (??? ??, 2006) by Ian Cammarata & Dontask
  75. r : Admins name displayed in team color, message text displayed green.
  76. + : Displays dead status.
  77. + : Added cvar sv_allchat to enable allchat without alltalk enabled.
  78.  
  79. v0.1 (April 04, 2006)
  80. + : Initial release
  81. */
  82.  
  83. #include <amxmodx>
  84.  
  85. #define FLAG ADMIN_RESERVATION
  86. #define VERSION "1.1"
  87.  
  88. new COLCHAR[3][2] = { "^x03"/*team col*/, "^x04"/*green*/, "^x01"/*white*/ }
  89.  
  90. //cvar pointers
  91. new p_allchat, p_namecol, p_msgcol, p_alltalk, p_hidestat, p_teamchat
  92.  
  93. //vars to check if message has already been duplicated
  94. new alv_sndr, alv_str2[26], alv_str4[101]
  95. new msg[200]
  96.  
  97. public col_changer( msg_id, msg_dest, rcvr )
  98. {
  99. new str2[26]
  100. get_msg_arg_string( 2, str2, 25 )
  101. if( equal( str2, "#Cstrike_Chat", 13 ) )
  102. {
  103. new str3[22]
  104. get_msg_arg_string( 3, str3, 21 )
  105.  
  106. if( !strlen( str3 ) )
  107. {
  108. new str4[101]
  109. get_msg_arg_string( 4, str4, 100 )
  110. new sndr = get_msg_arg_int( 1 )
  111.  
  112. new bool:is_team_msg = !bool:equal( str2, "#Cstrike_Chat_All", 17 )
  113.  
  114. new sndr_team = get_user_team( sndr )
  115. new bool:is_sndr_spec = !bool:( 0 < sndr_team < 3 )
  116.  
  117. new namecol = clamp( get_pcvar_num(p_namecol), 0, 2 )
  118. new msgcol = clamp( get_pcvar_num(p_msgcol), 0, 2 )
  119.  
  120. new bool:same_as_last = bool:( alv_sndr == sndr && equal( alv_str2, str2 ) && equal( alv_str4, str4) )
  121.  
  122. if( !same_as_last )
  123. {//Duplicate message once
  124. new allchat = clamp( get_pcvar_num( p_allchat ), 0, 2 )
  125. if( allchat == 2 || ( allchat == 1 && clamp( get_pcvar_num( p_alltalk ), 0, 1 ) == 1 ) )
  126. {
  127. if( !( is_team_msg && ( is_sndr_spec || is_team_msg && get_pcvar_num( p_teamchat ) == 0 ) ) )
  128. {//Don't duplicate if it's a spectator team message
  129. new flags[5], team[10]
  130. if( is_user_alive( sndr ) ) flags = "bch"
  131. else flags = "ach"
  132.  
  133. if( is_team_msg )
  134. {
  135. add( flags[strlen( flags )], 4, "e" )
  136. if( sndr_team == 1 ) team = "TERRORIST"
  137. else team = "CT"
  138. }
  139.  
  140. new players[32], num
  141. get_players( players, num, flags, team )
  142.  
  143. if( get_user_flags( sndr ) & FLAG )
  144. buildmsg( sndr, is_sndr_spec, is_team_msg, sndr_team, namecol, msgcol, str4 ) //admin colored, by cvars
  145. else buildmsg( sndr, is_sndr_spec, is_team_msg, sndr_team, 0, 2, str4 ) //normal colors
  146.  
  147. for( new i=0; i < num; i++ )
  148. {
  149. message_begin( MSG_ONE, get_user_msgid( "SayText" ), _, players[i] )
  150. write_byte( sndr )
  151. write_string( msg )
  152. message_end()
  153. }
  154.  
  155. }
  156.  
  157. alv_sndr = sndr
  158. alv_str2 = str2
  159. alv_str4 = str4
  160. if( task_exists( 411 ) ) remove_task( 411 )
  161. set_task( 0.1, "task_clear_antiloop_vars", 411 )
  162. }
  163. }
  164.  
  165. if( get_user_flags( sndr ) & FLAG && ( namecol != 0 || msgcol != 2 ) )
  166. {//execute if sndr is admin and cols are not set to engine defaults
  167. if( !same_as_last ) buildmsg( sndr, is_sndr_spec, is_team_msg, sndr_team, namecol, msgcol, str4 )
  168.  
  169. set_msg_arg_string( 2, msg )
  170. set_msg_arg_string( 4, "" )
  171. }
  172. }
  173. }
  174. return PLUGIN_CONTINUE
  175. }
  176.  
  177. public buildmsg( sndr, is_sndr_spec, is_team_msg, sndr_team, namecol, msgcol, str4[ ] )
  178. {
  179. new sndr_name[33]
  180. get_user_name( sndr, sndr_name, 32 )
  181.  
  182. new prefix[30] = "^x01"
  183. if( get_pcvar_num( p_hidestat ) == 0 )
  184. {
  185. if( is_sndr_spec ) prefix = "^x01*SPEC* "
  186. else if( !is_user_alive( sndr ) ) prefix = "^x01*DEAD* "
  187. }
  188.  
  189. if( is_team_msg )
  190. {
  191. if( is_sndr_spec ) prefix = "^x01(Spectator) "
  192. else if( sndr_team == 1 ) add( prefix[strlen(prefix)-1], 29, "(Terrorist) " )
  193. else if( sndr_team == 2 ) add( prefix[strlen(prefix)-1], 29, "(Counter-Terrorist) " )
  194. }
  195.  
  196. format( msg, 199, "%s%s%s : %s%s",\
  197. strlen( prefix ) > 1 ? prefix : "",\
  198. COLCHAR[namecol], sndr_name, COLCHAR[msgcol], str4 )
  199. return PLUGIN_HANDLED
  200. }
  201.  
  202. public task_clear_antiloop_vars( )
  203. {
  204. alv_sndr = 0
  205. alv_str2 = ""
  206. alv_str4 = ""
  207. return PLUGIN_HANDLED
  208. }
  209.  
  210. public plugin_init( )
  211. {
  212. register_plugin("All Chat",VERSION,"Ian Cammarata")
  213. register_cvar("allchat_version",VERSION,FCVAR_SERVER)
  214.  
  215. p_allchat = register_cvar( "sv_allchat", "1" )
  216. p_namecol = register_cvar( "ac_namecolor", "0" )
  217. p_msgcol = register_cvar( "ac_msgcolor", "1" )
  218. p_hidestat = register_cvar( "ac_hidestatus", "0" )
  219. p_teamchat = register_cvar( "ac_teamchat", "0" )
  220.  
  221. p_alltalk = get_cvar_pointer( "sv_alltalk" )
  222.  
  223. register_message( get_user_msgid("SayText"), "col_changer" )
  224. return PLUGIN_CONTINUE
  225. }

Hidd el,ez jó..


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Chat üzenetek láthatósága.
HozzászólásElküldve: 2015.04.04. 13:13 
Offline
Újonc

Csatlakozott: 2015.04.01. 16:46
Hozzászólások: 8
Megköszönték neki: 1 alkalommal
Vagy ez.. :
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <cstrike>
  3.  
  4. #define ADMIN_LEVEL ADMIN_KICK
  5.  
  6.  
  7. /***************************************************************************************************
  8. uc_adminmode & uc_playermode:
  9.  
  10. a = The dead can see the general chat messages of alive teammates
  11. b = The dead can see the general chat messages of alive enemies
  12. c = The alive can see the general chat messages of dead teammates
  13. d = The alive can see the general chat messages of dead enemies
  14. e = The dead can see the team messages of alive teammates
  15. f = The alive can see the team messages of dead teamates
  16. g = The dead can see the team messages of dead enemies
  17. h = The alive can see the team messages of alive enemies
  18. i = The dead can see the team messages of alive enemies
  19. j = The alive can see the team messages of dead enemies
  20. ***************************************************************************************************/
  21.  
  22. /*
  23. Author & Creator:
  24.  
  25. [ --<-@ ] Black Rose
  26.  
  27.  
  28.  
  29.  
  30.  
  31. Cred goes out to cs1.6 who requested it.
  32. He also patiently tested it and found bugs.
  33. */
  34.  
  35.  
  36. new g_msgid_SayText;
  37. new g_maxPlayers;
  38.  
  39. new pcvar_adminmode;
  40. new pcvar_playermode;
  41.  
  42.  
  43. new const textchannels[][] = {
  44. "#Cstrike_Chat_T",
  45. "#Cstrike_Chat_CT",
  46. "#Cstrike_Chat_Spec",
  47. "#Cstrike_Chat_All",
  48. "#Cstrike_Chat_AllSpec",
  49. "#Cstrike_Chat_AllDead",
  50. "#Cstrike_Chat_T_Dead",
  51. "#Cstrike_Chat_CT_Dead"
  52. };
  53.  
  54.  
  55. public plugin_init() {
  56. register_plugin("Ultimate Chat", "1.2", "[ --<-@ ]");
  57. pcvar_adminmode = register_cvar("uc_adminmode", "abcdefghij");
  58. pcvar_playermode = register_cvar("uc_playermode", "abe");
  59.  
  60. g_msgid_SayText = get_user_msgid("SayText");
  61. g_maxPlayers = get_maxplayers();
  62.  
  63. register_clcmd("say", "HandleSay");
  64. register_clcmd("say_team", "HandleSay");
  65. }
  66.  
  67. public HandleSay(id) {
  68.  
  69. if ( ! is_user_connected(id) )
  70. return PLUGIN_HANDLED;
  71.  
  72. new message[192], is_alive = is_user_alive(id), is_admin;
  73.  
  74. read_argv(0, message, 5);
  75. new is_team_msg = message[3] == '_';
  76.  
  77. get_pcvar_string(pcvar_playermode, message, 31);
  78. new playermode = read_flags(message);
  79.  
  80. get_pcvar_string(pcvar_adminmode, message, 31);
  81. new adminmode = read_flags(message);
  82.  
  83. new CsTeams:userTeam = cs_get_user_team(id);
  84.  
  85. read_args(message, 191);
  86. remove_quotes(message);
  87. trim(message);
  88.  
  89. for ( new i = 0 ; i < g_maxPlayers ; i++ ) {
  90.  
  91. if ( ! is_user_connected(i) )
  92. continue;
  93.  
  94. is_admin = get_user_flags(i) & ADMIN_LEVEL;
  95.  
  96. if (
  97. ( ( ( adminmode & 1 && is_admin ) || playermode & 1 ) && ! is_team_msg && is_alive && ! is_user_alive(i) && userTeam == cs_get_user_team(i) ) ||
  98. ( ( ( adminmode & 2 && is_admin ) || playermode & 2 ) && ! is_team_msg && is_alive && ! is_user_alive(i) && userTeam != cs_get_user_team(i) ) ||
  99. ( ( ( adminmode & 4 && is_admin ) || playermode & 4 ) && ! is_team_msg && ! is_alive && is_user_alive(i) && userTeam == cs_get_user_team(i) ) ||
  100. ( ( ( adminmode & 8 && is_admin ) || playermode & 8 ) && ! is_team_msg && ! is_alive && is_user_alive(i) && userTeam != cs_get_user_team(i) ) ||
  101. ( ( ( adminmode & 16 && is_admin ) || playermode & 16 ) && is_team_msg && userTeam == cs_get_user_team(i) && is_alive && ! is_user_alive(i) ) ||
  102. ( ( ( adminmode & 32 && is_admin ) || playermode & 32 ) && is_team_msg && userTeam == cs_get_user_team(i) && ! is_alive && is_user_alive(i) ) ||
  103. ( ( ( adminmode & 64 && is_admin ) || playermode & 64 ) && is_team_msg && userTeam != cs_get_user_team(i) && ! is_alive && ! is_user_alive(i) ) ||
  104. ( ( ( adminmode & 128 && is_admin ) || playermode & 128 ) && is_team_msg && userTeam != cs_get_user_team(i) && is_alive && is_user_alive(i) ) ||
  105. ( ( ( adminmode & 256 && is_admin ) || playermode & 256 ) && is_team_msg && userTeam != cs_get_user_team(i) && is_alive && ! is_user_alive(i) ) ||
  106. ( ( ( adminmode & 512 && is_admin ) || playermode & 512 ) && is_team_msg && userTeam != cs_get_user_team(i) && ! is_alive && is_user_alive(i) )
  107. ) {
  108. message_begin(MSG_ONE_UNRELIABLE, g_msgid_SayText, {0,0,0}, i);
  109. write_byte(id);
  110. write_string(textchannels[get_user_text_channel(id, userTeam, is_team_msg)]);
  111. write_string("");
  112. write_string(message);
  113. message_end();
  114. }
  115. }
  116. return PLUGIN_CONTINUE;
  117. }
  118.  
  119. stock get_user_text_channel(id, CsTeams:userTeam, is_team_msg) {
  120. if ( is_team_msg ) {
  121. switch ( userTeam ) {
  122. case CS_TEAM_T : {
  123. if ( is_user_alive(id) )
  124. return 0;
  125. else
  126. return 6;
  127. }
  128. case CS_TEAM_CT : {
  129. if ( is_user_alive(id) )
  130. return 1;
  131. else
  132. return 7;
  133. }
  134. case CS_TEAM_SPECTATOR, CS_TEAM_UNASSIGNED :
  135. return 2;
  136. }
  137. }
  138.  
  139. else {
  140. if ( is_user_alive(id) )
  141. return 3;
  142. else if ( userTeam == CsTeams:3 )
  143. return 4;
  144. }
  145. return 5;
  146. }
  147.  


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Chat üzenetek láthatósága.
HozzászólásElküldve: 2015.04.04. 14:21 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.12.15. 19:13
Hozzászólások: 495
Megköszönt másnak: 289 alkalommal
Megköszönték neki: 14 alkalommal
Hali, úgy tudom más chates pluginnal nem működik a hlmod-os allchat. Ezt tudom még ajánlani: iChat - v2.3.3


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  [ 4 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 14 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