hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.06.17. 04:44



Jelenlévő felhasználók

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

A legtöbb felhasználó (2761 fő) 2025.01.09. 20:06-kor tartózkodott itt.

Regisztrált felhasználók: Bing [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  [3 hozzászólás ] 
Szerző Üzenet
HozzászólásElküldve:2014.06.27. 22:34 
Offline
Tud valamit

Csatlakozott:2012.10.13. 19:47
Hozzászólások:100
Megköszönt másnak: 11 alkalommal
Megköszönték neki: 9 alkalommal
A következő kérdésem lenne ezzel a pluginnal kapcsolatban. Még hozzá a következő.

- Hogy ennek lehet-e valahol álitani az idejét hogy meddig mutassa a csíkot ?! (Erre a részére gondoltam átirtam 20-ra de semmi nem változott. write_byte( 100 ) // life in 0.1's)
- Másik kérdés átlehetne-e írni vagy valaki átírja-e nekem arra hogy csak annak mutassa akit lelőnek és mondjuk ha tudja filozni akkor még annak aki specben van. Ez megoldható ?

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmod>
  2. #include <cstrike>
  3.  
  4. #define TE_BEAMPOINTS 0
  5.  
  6. new m_spriteTexture
  7.  
  8. public death(){
  9. new player_num = 0 // A Player incrementer.
  10. new maxpl = get_maxplayers()+1 // Max players.
  11. new killer_id = read_data(1) // Killer's player ID.
  12. new victim_id = read_data(2) // Victim's player ID.
  13. new killer_team = get_user_team(killer_id) // The team the killer's on.
  14.  
  15. if (get_cvar_num("amx_deathbeams_enabled") == 1)
  16. {
  17. if (killer_id!=victim_id && killer_id)
  18. {
  19. new k_origin[3]
  20. new v_origin[3]
  21. get_user_origin(killer_id,k_origin)
  22. get_user_origin(victim_id,v_origin)
  23.  
  24. for(player_num = 1;player_num < maxpl; player_num++)
  25. {
  26. if(is_user_alive(player_num)==0 && get_user_time(player_num)!= 0)
  27. {
  28. message_begin(MSG_ONE, SVC_TEMPENTITY,{0,0,0},player_num)
  29. write_byte( TE_BEAMPOINTS )
  30. write_coord(k_origin[0])
  31. write_coord(k_origin[1])
  32. write_coord(k_origin[2])
  33. write_coord(v_origin[0])
  34. write_coord(v_origin[1])
  35. write_coord(v_origin[2])
  36. write_short( m_spriteTexture )
  37. write_byte( 1 ) // framestart
  38. write_byte( 1 ) // framerate
  39. write_byte( 100 ) // life in 0.1's
  40. write_byte( 25 ) // width
  41. write_byte( 0 ) // noise
  42.  
  43. // Set the color of the beam.
  44. if (get_cvar_num("amx_deathbeams_randcolor") == 1)
  45. {
  46. write_byte( random_num(50,255) ) // red
  47. write_byte( random_num(50,255) ) // green
  48. write_byte( random_num(50,255) ) // blue
  49. }
  50. else
  51. {
  52. if (killer_team == 1)
  53. { // Terrorist
  54. write_byte( 255 ) // red
  55. write_byte( 0 ) // green
  56. write_byte( 0 ) // blue
  57. }
  58. else
  59. { // Counter-terrorist
  60. write_byte( 0 ) // red
  61. write_byte( 0 ) // green
  62. write_byte( 255 ) // blue
  63. }
  64. }
  65. write_byte( 255 ) // brightness
  66. write_byte( 40 ) // speed
  67. message_end()
  68. }
  69. }
  70. }
  71. }
  72. }
  73.  
  74. public plugin_precache()
  75. m_spriteTexture = precache_model("sprites/laserbeam.spr")
  76.  
  77. public plugin_init()
  78. {
  79. register_plugin("All Death Beams","2.0","Mad Mike")
  80. register_event("DeathMsg","death","a")
  81. register_cvar("amx_deathbeams_enabled","1")
  82. register_cvar("amx_deathbeams_randcolor","1")
  83. }
  84.  
  85.  

_________________
Kép
Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve:2014.06.30. 21:03 
Offline
Senior Tag
Avatar

Csatlakozott:2014.04.22. 10:54
Hozzászólások:226
Megköszönték neki: 19 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. write_byte( 500 )


Próbáld meg ezt, nemtudom. Remélem sikerül :)


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve:2014.07.01. 13:43 
Offline
Minden6ó
Avatar

Csatlakozott:2011.01.19. 12:14
Hozzászólások:4294
Megköszönt másnak: 219 alkalommal
Megköszönték neki: 289 alkalommal
Elvileg csak a halott is a gyilkosa látja.

SMA Forráskód: [ Mindet kijelol ]
  1. /* AMX Mod X
  2. * Death-info beams III
  3. *
  4. * cvars:
  5. * amx_dib_holdtime <time in 0.1 seconds> - Life of beams
  6. * amx_dib_width <width in 0.1 units> - Width of beams
  7. * amx_dib_cross <size in 0.1 units> - Size of markers
  8. * amx_dib_color <RRRGGGBBB> - RGB color of beam
  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.  
  36. #include <amxmodx>
  37. #include <csstats>
  38.  
  39. new g_sprite;
  40. new g_iMaxPlayers
  41.  
  42. public plugin_init()
  43. {
  44. register_plugin("Death-info beams", "3.0", "BMJ");
  45. register_event("CS_DeathMsg", "death_msg", "a");
  46.  
  47. register_cvar("amx_dib_holdtime", "200");
  48. register_cvar("amx_dib_width", "10");
  49. register_cvar("amx_dib_cross", "30");
  50. register_cvar("amx_dib_color", "000255000");
  51.  
  52. g_iMaxPlayers = get_maxplayers()
  53. }
  54.  
  55.  
  56. public plugin_precache()
  57. {
  58. g_sprite = precache_model("sprites/dot.spr");
  59. }
  60.  
  61.  
  62. public death_msg()
  63. {
  64. new killer = read_data(1);
  65. new victim = read_data(2);
  66. if (killer == victim)
  67. return PLUGIN_HANDLED;
  68.  
  69. new vec_killer[3];
  70. new vec_victim[3];
  71. get_user_origin(killer, vec_killer, 1);
  72. get_user_origin(victim, vec_victim);
  73.  
  74. new color[12];
  75. get_cvar_string("amx_dib_color", color, 11);
  76. new b = str_to_num(color[6]);
  77. color[6] = 0;
  78. new g = str_to_num(color[3]);
  79. color[3] = 0;
  80. new r = str_to_num(color[0]);
  81.  
  82. new size = get_cvar_num("amx_dib_cross");
  83.  
  84. for(new id = 1; id <= g_iMaxPlayers; id++)
  85. {
  86. if(is_user_connected(id) && !is_user_alive(id))
  87. {
  88. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  89. write_byte(0);
  90. write_coord(vec_killer[0] + size);
  91. write_coord(vec_killer[1]);
  92. write_coord(vec_killer[2]);
  93. write_coord(vec_killer[0] - size);
  94. write_coord(vec_killer[1]);
  95. write_coord(vec_killer[2]);
  96. write_short(g_sprite);
  97. write_byte(1);
  98. write_byte(1);
  99. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  100. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  101. write_byte(0);
  102. if (get_user_team(killer) == 1)
  103. {
  104. write_byte(255);
  105. write_byte(50);
  106. write_byte(50);
  107. }
  108. else
  109. {
  110. write_byte(100);
  111. write_byte(100);
  112. write_byte(255);
  113. }
  114. write_byte(100);
  115. write_byte(0);
  116. message_end();
  117.  
  118. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  119. write_byte(0);
  120. write_coord(vec_killer[0]);
  121. write_coord(vec_killer[1] + size);
  122. write_coord(vec_killer[2]);
  123. write_coord(vec_killer[0]);
  124. write_coord(vec_killer[1] - size);
  125. write_coord(vec_killer[2]);
  126. write_short(g_sprite);
  127. write_byte(1);
  128. write_byte(1);
  129. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  130. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  131. write_byte(0);
  132. if (get_user_team(killer) == 1)
  133. {
  134. write_byte(255);
  135. write_byte(50);
  136. write_byte(50);
  137. }
  138. else
  139. {
  140. write_byte(100);
  141. write_byte(100);
  142. write_byte(255);
  143. }
  144. write_byte(100);
  145. write_byte(0);
  146. message_end();
  147.  
  148. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  149. write_byte(0);
  150. write_coord(vec_killer[0]);
  151. write_coord(vec_killer[1]);
  152. write_coord(vec_killer[2] + size);
  153. write_coord(vec_killer[0]);
  154. write_coord(vec_killer[1]);
  155. write_coord(vec_killer[2] - size);
  156. write_short(g_sprite);
  157. write_byte(1);
  158. write_byte(1);
  159. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  160. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  161. write_byte(0);
  162. if (get_user_team(killer) == 1)
  163. {
  164. write_byte(255);
  165. write_byte(50);
  166. write_byte(50);
  167. }
  168. else
  169. {
  170. write_byte(100);
  171. write_byte(100);
  172. write_byte(255);
  173. }
  174. write_byte(100);
  175. write_byte(0);
  176. message_end();
  177.  
  178. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  179. write_byte(0);
  180. write_coord(vec_victim[0] + size);
  181. write_coord(vec_victim[1]);
  182. write_coord(vec_victim[2]);
  183. write_coord(vec_victim[0] - size);
  184. write_coord(vec_victim[1]);
  185. write_coord(vec_victim[2]);
  186. write_short(g_sprite);
  187. write_byte(1);
  188. write_byte(1);
  189. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  190. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  191. write_byte(0);
  192. if (get_user_team(victim) == 1)
  193. {
  194. write_byte(255);
  195. write_byte(50);
  196. write_byte(50);
  197. }
  198. else
  199. {
  200. write_byte(100);
  201. write_byte(100);
  202. write_byte(255);
  203. }
  204. write_byte(100);
  205. write_byte(0);
  206. message_end();
  207.  
  208. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  209. write_byte(0);
  210. write_coord(vec_victim[0]);
  211. write_coord(vec_victim[1] + size);
  212. write_coord(vec_victim[2]);
  213. write_coord(vec_victim[0]);
  214. write_coord(vec_victim[1] - size);
  215. write_coord(vec_victim[2]);
  216. write_short(g_sprite);
  217. write_byte(1);
  218. write_byte(1);
  219. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  220. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  221. write_byte(0);
  222. if (get_user_team(victim) == 1)
  223. {
  224. write_byte(255);
  225. write_byte(50);
  226. write_byte(50);
  227. }
  228. else
  229. {
  230. write_byte(50);
  231. write_byte(50);
  232. write_byte(255);
  233. }
  234. write_byte(100);
  235. write_byte(0);
  236. message_end();
  237.  
  238. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  239. write_byte(0);
  240. write_coord(vec_victim[0]);
  241. write_coord(vec_victim[1]);
  242. write_coord(vec_victim[2] + size);
  243. write_coord(vec_victim[0]);
  244. write_coord(vec_victim[1]);
  245. write_coord(vec_victim[2] - size);
  246. write_short(g_sprite);
  247. write_byte(1);
  248. write_byte(1);
  249. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  250. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  251. write_byte(0);
  252. if (get_user_team(victim) == 1)
  253. {
  254. write_byte(255);
  255. write_byte(50);
  256. write_byte(50);
  257. }
  258. else
  259. {
  260. write_byte(100);
  261. write_byte(100);
  262. write_byte(255);
  263. }
  264. write_byte(100);
  265. write_byte(0);
  266. message_end();
  267.  
  268. message_begin(MSG_ONE, SVC_TEMPENTITY, {0, 0, 0}, id);
  269. write_byte(0);
  270. write_coord(vec_killer[0]);
  271. write_coord(vec_killer[1]);
  272. write_coord(vec_killer[2]);
  273. write_coord(vec_victim[0]);
  274. write_coord(vec_victim[1]);
  275. write_coord(vec_victim[2]);
  276. write_short(g_sprite);
  277. write_byte(1);
  278. write_byte(1);
  279. write_byte(get_cvar_num("amx_dib_holdtime")); // x 0.1
  280. write_byte(get_cvar_num("amx_dib_width")); // x 0.1
  281. write_byte(0);
  282. write_byte(r);
  283. write_byte(g);
  284. write_byte(b);
  285. write_byte(100);
  286. write_byte(0);
  287. message_end();
  288. }
  289. }
  290. return PLUGIN_HANDLED;
  291. }
  292. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  293. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1031\\ f0\\ fs16 \n\\ par }
  294. */
  295.  

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


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


Ki van itt

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