hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.25. 06:24



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: 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  [ 1 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Ultimate Killstreak hiba!
HozzászólásElküldve: 2014.03.03. 19:32 
Offline
Jómunkásember

Csatlakozott: 2013.10.01. 19:07
Hozzászólások: 319
Megköszönt másnak: 50 alkalommal
Megköszönték neki: 23 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. #define PLUGIN_NAME "Ultimate KillStreak Advanced"
  5. #define PLUGIN_VERSION "1.0"
  6. #define PLUGIN_AUTHOR "Dizzy"
  7.  
  8.  
  9. new lastman_mode;
  10. new alone_ann = 0;
  11. new kills[33] = {0,...};
  12. new deaths[33] = {0,...};
  13. new kill[33][24];
  14.  
  15. #define LEVELS 13
  16. #define hsounds 14
  17. #define knsounds 2
  18. #define prpsounds 4
  19. #define maxdbsounds 2
  20. #define TASK_CLEAR_KILL 100
  21.  
  22. new hsenable
  23. new knifeenable
  24. new cvardouble
  25. new rnstartcvar
  26. new killstreaktype
  27.  
  28.  
  29. new levels[13] = {3,4,5,6,7,8,9,10,11,13,15,18,20};
  30.  
  31. new sounds[13][] =
  32. {
  33. "sound/Genius_2020/1",
  34. "sound/Genius_2020/2",
  35. "sound/Genius_2020/3",
  36. "sound/Genius_2020/4",
  37. "sound/Genius_2020/5",
  38. "sound/Genius_2020/6",
  39. "sound/Genius_2020/7",
  40. "sound/Genius_2020/8",
  41. "sound/Genius_2020/9",
  42. "sound/Genius_2020/10",
  43. "sound/Genius_2020/11",
  44. "sound/Genius_2020/12",
  45. "sound/Genius_2020/13"
  46. };
  47.  
  48. new messages[13][] =
  49. {
  50. "[* 1.szint *] %s: 3 kill Tripla Kill !!!",
  51. "[* 2.szint *] %s: 4 kill Multi Kill !!!" ,
  52. "[* 3.szint *] %s: 5 kill Ultra Kill !!!" ,
  53. "[* 4.szint *] %s: 6 kill Mega Kill !!!" ,
  54. "[* 5.szint *] %s: 8 kill Tombol !!!",
  55. "[* 6.szint *] %s: 9 kill Gyilkologe'p !!! ",
  56. "[* 7.szint *] %s: 10 kill Hihetetlen !!! " ,
  57. "[* 8.szint *] %s: 11 kill Szörnyeteg !!! ",
  58. "[* 9.szint *] %s: 12 kill Szent szar !!! " ,
  59. "[* 10.szint *] %s: 15 kill Isten vagy !!! " ,
  60. "[* 11.szint *] %s: 18 kill Legyozhetetlen !!! ",
  61. "[* 12.szint *] %s: kill Ki'raly vagy !!! ",
  62.  
  63. new hslist[hsounds][] =
  64. {
  65. "sound/Genius_2020/hs1",
  66. "sound/Genius_2020/hs2",
  67. "sound/Genius_2020/hs3",
  68. "sound/Genius_2020/hs4",
  69. "sound/Genius_2020/hs5",
  70. "sound/Genius_2020/hs6",
  71. "sound/Genius_2020/hs7",
  72. "sound/Genius_2020/hs8",
  73. "sound/Genius_2020/hs9",
  74. "sound/Genius_2020/hs10",
  75. "sound/Genius_2020/hs11",
  76. "sound/Genius_2020/hs12",
  77. "sound/Genius_2020/hs13",
  78. "sound/Genius_2020/hs14"
  79.  
  80. }
  81.  
  82.  
  83. new preplist[prpsounds][]=
  84. {
  85. "sound/Genius_2020/prepare1",
  86. "sound/Genius_2020/prepare2",
  87. "sound/Genius_2020/prepare3",
  88. "sound/Genius_2020/prepare4"
  89. }
  90.  
  91.  
  92.  
  93.  
  94.  
  95. new hsmessages[4][]=
  96. {
  97. "%s leszedte %s fejét !!",
  98. "%s hihetetlen fejest adott %s-nak !",
  99. "%s -tol kapott egy gyonyoru HEADSHOT-ot %s!",
  100. "%s adott %s -nek egy super headshotot !"
  101. }
  102.  
  103. new knlist[knsounds][]=
  104. {
  105. "sound/Genius_2020/knife1",
  106. "sound/Genius_2020/knife2"
  107. }
  108.  
  109. new knmessages[3][]=
  110. {
  111. "%s ledofte %s",
  112. "%s felszabdalta a ke'se'vel %s",
  113. "%s lekeselte %s"
  114. }
  115.  
  116.  
  117. new doublelist[maxdbsounds][]=
  118. {
  119. "sound/Genius_2020/doublekill1",
  120. "sound/Genius_2020/doublekill2"
  121. }
  122.  
  123. new messagesnohp[5][]=
  124. {
  125.  
  126. "%i terrorist vs %i CT^n%s: Sza'mitunk ra'd haver el ne baszd!",
  127. "%i terrorist vs %i CT^n%s: Reme'lem van na'lad e'letmento csomag",
  128. "%i terrorist vs %i CT^n%s: Kinyirta'k a csapta'rsaid.Sok szerencse't!",
  129. "%i terrorist vs %i CT^n%s: Te vagy az utolso reme'nyunk!",
  130. "%i terrorist vs %i CT^n%s: Most egyedul vagy.Jo szorakozast!"
  131. }
  132.  
  133. new messageshp[5][]=
  134. {
  135.  
  136. "%i terrorist vs %i CT^n%s (%i hp): Sza'mitunk ra'd haver el ne baszd!",
  137. "%i terrorist vs %i CT^n%s (%i hp): Reme'lem van na'lad e'letmento csomag",
  138. "%i terrorist vs %i CT^n%s (%i hp): Kinyirta'k a csapta'rsaid.Sok szerencse't!",
  139. "%i terrorist vs %i CT^n%s (%i hp): Te vagy az utolso reme'nyunk!",
  140. "%i terrorist vs %i CT^n%s (%i hp): Most egyedul vagy.Jo szorakozast!"
  141.  
  142. }
  143.  
  144. is_mode_set(bits) {
  145. new mode[9];
  146. get_cvar_string("ut_killstreak_advanced", mode, 8);
  147. return read_flags(mode) & bits;
  148. }
  149.  
  150. public plugin_init() {
  151. register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
  152. killstreaktype = register_cvar("ut_killstreak_advanced", "3");
  153. register_event("ResetHUD", "reset_hud", "b");
  154. register_event("HLTV","rnstart","a", "1=0", "2=0");
  155. register_event("DeathMsg", "event_death", "a");
  156. hsenable = register_cvar("ut_killstreak_hs","1");
  157. knifeenable = register_cvar("ut_killstreak_knife","1");
  158. cvardouble = register_cvar("ut_doublekill_events","1");
  159. rnstartcvar = register_cvar("ut_roundcout_sounds","1");
  160. register_event("DeathMsg","death_msg","a");
  161. register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw");
  162. register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w");
  163. lastman_mode = register_cvar("lastman_mode","abc")
  164.  
  165. return PLUGIN_CONTINUE;
  166. }
  167.  
  168.  
  169. public event_death(id) {
  170. new killer = read_data(1);
  171. new victim = read_data(2);
  172. new headshot = read_data(3);
  173. new weapon[24], vicname[32], killname[32]
  174. read_data(4,weapon,23)
  175. get_user_name(victim,vicname,31)
  176. get_user_name(killer,killname,31)
  177.  
  178.  
  179.  
  180. if(headshot == 1 && get_pcvar_num(hsenable) ==1)
  181. {
  182. set_hudmessage(random(255),random(255),random(255), -1.0, 0.25, 0, 2.0, 2.0)
  183. show_hudmessage(0, (hsmessages[random_num(0,3)]), killname, vicname)
  184. new i
  185. i = random_num(0,hsounds-1)
  186. client_cmd(0,"spk %s",hslist[i])
  187. }
  188.  
  189.  
  190. if(weapon[0] == 'k' && get_pcvar_num(knifeenable) ==1)
  191. {
  192. set_hudmessage(random(255),random(255),random(255), -1.0, 0.25, 0, 2.0, 2.0)
  193. show_hudmessage(0, (knmessages[random_num(0,2)]), killname, vicname)
  194. new r
  195. r = random_num(0,knsounds-1)
  196. client_cmd(0,"spk %s",knlist[r])
  197. }
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204. if(kill[killer][0] && equal(kill[killer],weapon) && get_pcvar_num(cvardouble) == 1)
  205. {
  206. set_hudmessage(random(255),random(255),random(255), -1.0, 0.25, 0, 2.0, 2.0)
  207. show_hudmessage(0,"OMG %s Szep Dupla oles", killname)
  208. kill[killer][0] = 0;
  209. new q
  210. q= random_num(0,maxdbsounds-1)
  211. client_cmd(0,"spk %s",doublelist[q])
  212. }
  213.  
  214. else
  215. {
  216. kill[killer] = weapon;
  217. set_task(0.1,"clear_kill",TASK_CLEAR_KILL+killer);
  218. }
  219.  
  220.  
  221.  
  222. kills[killer] += 1;
  223. kills[victim] = 0;
  224. deaths[killer] = 0;
  225. deaths[victim] += 1;
  226.  
  227. for (new i = 0; i < LEVELS; i++)
  228. {
  229. if (kills[killer] == levels[i])
  230. {
  231. announce(killer, i);
  232. return PLUGIN_CONTINUE;
  233. }
  234. }
  235.  
  236. return PLUGIN_CONTINUE;
  237. }
  238.  
  239. announce(killer, level)
  240. {
  241.  
  242. new name[33]
  243.  
  244. get_user_name(killer, name, 32);
  245. set_hudmessage( random(255),random(255),random(255), 0.05, 0.65, 0, 3.0, 3.0, 0.01, 0.1, 2);
  246.  
  247. if( (get_pcvar_num(killstreaktype) <= 0 ) || get_pcvar_num(killstreaktype) > 3)
  248. return PLUGIN_HANDLED;
  249.  
  250.  
  251.  
  252. if(get_pcvar_num(killstreaktype) == 1)
  253. {
  254. show_hudmessage(0, messages[level], name);
  255. }
  256.  
  257. if(get_pcvar_num(killstreaktype) == 2)
  258. {
  259. client_cmd(0, "spk %s", sounds[level]);
  260. }
  261.  
  262. if(get_pcvar_num(killstreaktype) == 3)
  263. {
  264. show_hudmessage(0, messages[level], name);
  265. client_cmd(0, "spk %s", sounds[level]);
  266. }
  267.  
  268. return PLUGIN_CONTINUE;
  269.  
  270. }
  271.  
  272.  
  273. public reset_hud(id)
  274. {
  275. if (is_mode_set(16)) {
  276. if (kills[id] > levels[0]) {
  277. client_print(id, print_chat,
  278. "* Egymas utan %d oles ", kills[id]);
  279. } else if (deaths[id] > 1) {
  280. client_print(id, print_chat,
  281. "* Ma'r %d halalod volt egymas utan.", deaths[id]);
  282.  
  283. }
  284. }
  285. }
  286.  
  287. public rnstart(id)
  288. {
  289. if(get_pcvar_num(rnstartcvar) == 1)
  290. {
  291. set_hudmessage(random(255),random(255),random(255), -1.0, 0.30, 0, 6.0, 6.0)
  292. show_hudmessage(0, "Keszulj fel a harcra!")
  293. new q
  294. q = random_num(0,prpsounds-1)
  295. client_cmd(0,"spk %s",preplist[q])
  296. }
  297. }
  298.  
  299. public client_connect(id) {
  300. kills[id] = 0;
  301. deaths[id] = 0;
  302. }
  303.  
  304. public clear_kill(taskid)
  305. {
  306. new id = taskid-TASK_CLEAR_KILL;
  307. kill[id][0] = 0;
  308. }
  309.  
  310. public roundend_msg(id)
  311.  
  312. alone_ann = 0
  313.  
  314. public death_msg(id)
  315. {
  316.  
  317. new lmmode[8]
  318. get_pcvar_string(lastman_mode,lmmode,8)
  319. new lmmode_bit = read_flags(lmmode)
  320.  
  321. new players_ct[32], players_t[32], ict, ite, last
  322. get_players(players_ct,ict,"ae","CT")
  323. get_players(players_t,ite,"ae","TERRORIST")
  324.  
  325. if (ict==1&&ite==1)
  326. {
  327. new name1[32], name2[32]
  328. get_user_name(players_ct[0],name1,32)
  329. get_user_name(players_t[0],name2,32)
  330. set_hudmessage(random(255),random(255),random(255), -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
  331.  
  332. if (lmmode_bit & 1)
  333. {
  334. if (lmmode_bit & 2)
  335. {
  336. show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
  337. }
  338.  
  339. else
  340. {
  341. show_hudmessage(0,"%s vs. %s",name1,name2)
  342. }
  343.  
  344. if (lmmode_bit & 4)
  345. {
  346. for(new i=1;i<=get_maxplayers();i++)
  347. if( is_user_connected(i) == 1 )
  348. client_cmd(i,"spk /Genius_2020/maytheforce")
  349. }
  350. }
  351. }
  352. else
  353. {
  354. if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
  355. {
  356. last=players_ct[0]
  357. client_cmd(last,"spk/Genius_2020/oneandonly")
  358.  
  359. }
  360.  
  361. else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
  362. {
  363. last=players_t[0]
  364. client_cmd(last,"spk/Genius_2020/oneandonly")
  365. }
  366.  
  367. else
  368. {
  369. return PLUGIN_CONTINUE
  370. }
  371. alone_ann = last
  372. new name[32]
  373. get_user_name(last,name,32)
  374.  
  375. if (lmmode_bit & 1)
  376. {
  377. set_hudmessage(random(255),random(255),random(255), -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
  378.  
  379. if (lmmode_bit & 2)
  380. {
  381. show_hudmessage(0, messageshp[ random_num(0,5) ],ite ,ict ,name,get_user_health(last))
  382. }
  383.  
  384. else
  385. {
  386. show_hudmessage(0, messagesnohp[ random_num(0,5) ],ite ,ict ,name )
  387. }
  388. }
  389.  
  390. }
  391. return PLUGIN_CONTINUE
  392. }
  393. public plugin_precache()
  394. {
  395. precache_sound("Genius_2020/1.wav")
  396. precache_sound("Genius_2020/2.wav")
  397. precache_sound("Genius_2020/3.wav")
  398. precache_sound("Genius_2020/4.wav")
  399. precache_sound("Genius_2020/5.wav")
  400. precache_sound("Genius_2020/6.wav")
  401. precache_sound("Genius_2020/7.wav")
  402. precache_sound("Genius_2020/8.wav")
  403. precache_sound("Genius_2020/9.wav")
  404. precache_sound("Genius_2020/11.wav")
  405. precache_sound("Genius_2020/12.wav")
  406. precache_sound("Genius_2020/hs1.wav")
  407. precache_sound("Genius_2020/hs2.wav")
  408. precache_sound("Genius_2020/hs3.wav")
  409. precache_sound("Genius_2020/hs4.wav")
  410. precache_sound("Genius_2020/hs5.wav")
  411. precache_sound("Genius_2020/hs6.wav")
  412. precache_sound("Genius_2020/hs7.wav")
  413. precache_sound("Genius_2020/hs8.wav")
  414. precache_sound("Genius_2020/hs9.wav")
  415. precache_sound("Genius_2020/hs10.wav")
  416. precache_sound("Genius_2020/hs11.wav")
  417. precache_sound("Genius_2020/hs12.wav")
  418. precache_sound("Genius_2020/hs13.wav")
  419. precache_sound("Genius_2020/hs14.wav")
  420. precache_sound("Genius_2020/knife1.wav")
  421. precache_sound("Genius_2020/knife2.wav")
  422. precache_sound("Genius_2020/prepare1.wav")
  423. precache_sound("Genius_2020/prepare2.wav")
  424. precache_sound("Genius_2020/prepare3.wav")
  425. precache_sound("Genius_2020/prepare4.wav")
  426. precache_sound("Genius_2020/doublekill1.wav")
  427. precache_sound("Genius_2020/doublekill2.wav")
  428. }
  429.  

_________________
[kozep]Kép[/kozep]
[kozep]Naponta fejlesztések ezért is megéri fel jonni!:)[/kozep]
[kozep]Troy ~ 1337. CFG[/kozep]


A hozzászólást 1 alkalommal szerkesztették, utoljára crazy` 2014.03.03. 19:55-kor.
Témanévre máskor figyelj!


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


Ki van itt

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