hlmod.hu
https://hlmod.hu/

Fire in the hole! TILTÓ
https://hlmod.hu/viewtopic.php?f=29&t=20779
Oldal: 1 / 1

Szerző:  joxxa4cfg [ 2015.05.24. 17:56 ]
Hozzászólás témája:  Fire in the hole! TILTÓ

Sziasztok! Szeretnék kérni 1 plugint, ami azt teszi, hogy a chatbe letiltja a Fire in the hole!-t
pl:
Weirdo (RADIO): Fire in the hole!

Aki segítene annak nagyon megköszönném
További szép napot mindenkinek és kellemes ünnepeket! :)

Szerző:  .:[Z]o.O[M]:. :D [ 2015.05.24. 18:10 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

Talán ez, nem biztos :S
https://forums.alliedmods.net/showthrea ... 1?p=466271

Szerző:  6almasok [ 2015.05.25. 08:38 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

Ebbe még úgy át tudod írni
viewtopic.php?f=101&t=11958

Szerző:  babapiskóta.~ [ 2015.05.25. 18:00 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #define PLUGIN_NAME "Fire in the hole!"
  4. #define PLUGIN_VERSION "0.1"
  5. #define PLUGIN_AUTHOR "VEN"
  6.  
  7. enum grenade {
  8. GRENADE_HE,
  9. GRENADE_FLASH,
  10. GRENADE_SMOKE
  11. }
  12.  
  13. // EDITABLE: grenade description
  14. new const g_grenade_description[_:grenade][] = {
  15. "",
  16. "",
  17. ""
  18. }
  19.  
  20. enum color {
  21. COLOR_NORMAL,
  22. COLOR_RED,
  23. COLOR_BLUE,
  24. COLOR_GRAY,
  25. COLOR_GREEN
  26. }
  27.  
  28. // EDITABLE: grenade description text color
  29. new const g_grenade_desccolor[_:grenade] = {
  30. COLOR_RED,
  31. COLOR_GRAY,
  32. COLOR_GREEN
  33. }
  34.  
  35. new const g_grenade_weaponid[_:grenade] = {
  36. CSW_HEGRENADE,
  37. CSW_FLASHBANG,
  38. CSW_SMOKEGRENADE
  39. }
  40.  
  41. #define COLORCODE_NORMAL 0x01
  42. #define COLORCODE_TEAM 0x03
  43. #define COLORCODE_LOCATION 0x04
  44.  
  45. new const g_color_code[_:color] = {
  46. COLORCODE_NORMAL,
  47. COLORCODE_TEAM,
  48. COLORCODE_TEAM,
  49. COLORCODE_TEAM,
  50. COLORCODE_LOCATION
  51. }
  52.  
  53. new const g_color_teamname[_:color][] = {
  54. "",
  55. "TERRORIST",
  56. "CT",
  57. "SPECTATOR",
  58. ""
  59. }
  60.  
  61. #define RADIOTEXT_MSGARG_NUMBER 5
  62.  
  63. enum radiotext_msgarg {
  64. RADIOTEXT_MSGARG_PRINTDEST = 1,
  65. RADIOTEXT_MSGARG_CALLERID,
  66. RADIOTEXT_MSGARG_TEXTTYPE,
  67. RADIOTEXT_MSGARG_CALLERNAME,
  68. RADIOTEXT_MSGARG_RADIOTYPE,
  69. }
  70.  
  71. new const g_required_radiotype[] = "#Fire_in_the_hole"
  72. new const g_radiotext_template[] = ""
  73.  
  74. new g_msgid_saytext
  75. new g_msgid_teaminfo
  76.  
  77. public plugin_init() {
  78. register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
  79.  
  80. register_message(get_user_msgid("TextMsg"), "message_text")
  81.  
  82. g_msgid_saytext = get_user_msgid("SayText")
  83. g_msgid_teaminfo = get_user_msgid("TeamInfo")
  84. }
  85.  
  86. public message_text(msgid, dest, id) {
  87. if (get_msg_args() != RADIOTEXT_MSGARG_NUMBER || get_msg_argtype(RADIOTEXT_MSGARG_RADIOTYPE) != ARG_STRING)
  88. return PLUGIN_CONTINUE
  89.  
  90. static arg[32]
  91. get_msg_arg_string(RADIOTEXT_MSGARG_RADIOTYPE, arg, sizeof arg - 1)
  92. if (!equal(arg, g_required_radiotype))
  93. return PLUGIN_CONTINUE
  94.  
  95. get_msg_arg_string(RADIOTEXT_MSGARG_CALLERID, arg, sizeof arg - 1)
  96. new caller = str_to_num(arg)
  97. if (!is_user_alive(caller))
  98. return PLUGIN_CONTINUE
  99.  
  100. new clip, ammo, weapon
  101. weapon = get_user_weapon(caller, clip, ammo)
  102. for (new i; i < sizeof g_grenade_weaponid; ++i) {
  103. if (g_grenade_weaponid[i] == weapon) {
  104. static text[192]
  105. new pos = 0
  106. text[pos++] = g_color_code[COLOR_NORMAL]
  107.  
  108. get_msg_arg_string(RADIOTEXT_MSGARG_CALLERNAME, arg, sizeof arg - 1)
  109. pos += formatex(text[pos], sizeof text - pos - 1, g_radiotext_template, arg)
  110. copy(text[++pos], sizeof text - pos - 1, g_grenade_description[i])
  111.  
  112. new desccolor = g_grenade_desccolor[i]
  113. if ((text[--pos] = g_color_code[desccolor]) == COLORCODE_TEAM) {
  114. static teamname[12]
  115. get_user_team(id, teamname, sizeof teamname - 1)
  116.  
  117. if (!equal(teamname, g_color_teamname[desccolor])) {
  118. msg_teaminfo(id, g_color_teamname[desccolor])
  119. msg_saytext(id, text)
  120. msg_teaminfo(id, teamname)
  121.  
  122. return PLUGIN_HANDLED
  123. }
  124. }
  125.  
  126. msg_saytext(id, text)
  127.  
  128. return PLUGIN_HANDLED
  129. }
  130. }
  131.  
  132. return PLUGIN_CONTINUE
  133. }
  134.  
  135. msg_teaminfo(id, teamname[]) {
  136. message_begin(MSG_ONE, g_msgid_teaminfo, _, id)
  137. write_byte(id)
  138. write_string(teamname)
  139. message_end()
  140. }
  141.  
  142. msg_saytext(id, text[]) {
  143. message_begin(MSG_ONE, g_msgid_saytext, _, id)
  144. write_byte(id)
  145. write_string(text)
  146. message_end()
  147. }

Szerző:  |E|xTazYyyy^.~ [ 2015.06.02. 10:50 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

jah a gránátnév átiró pluginban kitörlöd és nemfogja kiirni!

Szerző:  mforce [ 2015.06.02. 11:43 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

Az aztán nagyon jó megoldás... -.-

Szerző:  oroszrulett [ 2015.06.04. 13:17 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

Ha normális választ nem tudtok adni, ne szóljatok hozzá. Minden 2. offnál, figyelmeztetni fogok mindenkit. Nincs kivétel. Remélem érthető voltam.

Tessék, ez blokkolja az üzenetet.

SMA Forráskód: [ Mindet kijelol ]
  1. public plugin_init() {
  2. register_message(get_user_msgid("TextMsg"), "msg_text")
  3. }
  4.  
  5.  
  6. public msg_text()
  7. {
  8. if(get_msg_args() != 5 || get_msg_argtype(3) != ARG_STRING || get_msg_argtype(5) != ARG_STRING) {
  9. return PLUGIN_CONTINUE
  10. }
  11.  
  12. new arg3[16]
  13. get_msg_arg_string(3, arg3, 15)
  14. if(!equal(arg3, "#Game_radio")) {
  15. return PLUGIN_CONTINUE
  16. }
  17.  
  18. new arg5[20]
  19. get_msg_arg_string(5, arg5, 19)
  20. if(equal(arg5, "#Fire_in_the_hole"))
  21. {
  22. client_print(0, print_chat, "Uzenet blokkolva.")
  23. return PLUGIN_HANDLED
  24. }
  25.  
  26. return PLUGIN_CONTINUE
  27. }

Szerző:  mforce [ 2015.06.04. 13:25 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

Amit írtál semmire nem jó,tessék, ezt már kolléga linkelte fentebb.
https://forums.alliedmods.net/showthread.php?p=466271

Szerző:  oroszrulett [ 2015.06.04. 13:29 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

mforce írta:
Amit írtál semmire nem jó,tessék, ezt már kolléga linkelte fentebb.
https://forums.alliedmods.net/showthread.php?p=466271


Tesztelve, 5 éve még működött ez a plugin. Azt kérte, hogy a textet ne írja ki. Fölösleges ekkora plugin, sok funkcióját úgy se használná a kérdező.

Szerző:  mforce [ 2015.06.04. 13:30 ]
Hozzászólás témája:  Re: Fire in the hole! TILTÓ

Akkor a sok funkcióját kipakolja

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/