hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.06.16. 15:46



Jelenlévő felhasználók

Jelenleg 377 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 375 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], Google [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  [2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: plugin átalakítás
HozzászólásElküldve:2013.12.15. 18:03 
Offline
Senior Tag

Csatlakozott:2013.07.29. 13:15
Hozzászólások:233
Megköszönt másnak: 125 alkalommal
Helló.
Nekem ebböl a pluginbol--> Végső/ultimate Hangok ezeket kelene kiszedni hogy ne írja ki ezeket a hudra :
[en]
KNIFE_MSG_1 = %s Sliced And Diced %s!
KNIFE_MSG_2 = %s Slashed %s!
KNIFE_MSG_3 = %s Shanked %s!
KNIFE_MSG_4 = %s Pulled A Knife On %s!
KNIFE_MSG_5 = %s Knifed %s!

NOHP_MSG_1 = %i terrorist vs %i CT^n%s: Szamit rad a csapat!
NOHP_MSG_2 = %i terrorista vs %i CT^n%s: Remelem van nalad eletmento csomag.
NOHP_MSG_3 = %i terrorist vs %i CT^n%s: Az osszes csapattarsad kinyirtak!Sok Sikert!
NOHP_MSG_4 = %i terrorist vs %i CT^n%s: Az ero veled van!
NOHP_MSG_5 = %i terrorist vs %i CT^n%s: Egyedul maradtal!Hajra!

HP_MSG_1 = %i terrorista vs %i CT^n%s (%i hp): Remelem van nalad eletmento csomag.
HP_MSG_2 = %i terrorist vs %i CT^n%s (%i hp): Szamit rada csapat!
HP_MSG_3 = %i terrorist vs %i CT^n%s (%i hp): Az osszes csapattarsad kinyirtak.Sok Sikert!
HP_MSG_4 = %i terrorist vs %i CT^n%s (%i hp): Az ero veled van!
HP_MSG_5 = %i terrorist vs %i CT^n%s (%i hp): Egyedul maradtal.Hajra!

KILL_STREAK = *Igy tovabb, %d-et oltel.
DEATH_STREAK = * Ovatosabbab ,%dx meghaltál.

Aki elkészíti megy a gomb!!


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: plugin átalakítás
HozzászólásElküldve:2013.12.15. 20:53 
Offline
Jómunkásember
Avatar

Csatlakozott:2013.10.27. 23:13
Hozzászólások:412
Megköszönt másnak: 21 alkalommal
Megköszönték neki: 68 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. /********************************************************************************
  2.   * AMX Mod X script.
  3.   *
  4.   * Ultimate Sounds (Ultimate_Sounds.sma)
  5.   * Copyright (C) 2006-2008 Bmann_420 / Dizzy / Hoboman
  6.   *
  7.   * This program is free software; you can redistribute it and/or
  8.   * modify it under the terms of the GNU General Public License
  9.   * as published by the Free Software Foundation; either version 2
  10.   * of the License, or (at your option) any later version.
  11.   *
  12.   * This program is distributed in the hope that it will be useful,
  13.   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15.   * GNU General Public License for more details.
  16.   *
  17.   * You should have received a copy of the GNU General Public License
  18.   * along with this program; if not, write to the Free Software
  19.   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20.   *
  21.   * In addition, as a special exception, the author gives permission to
  22.   * link the code of this program with the Half-Life Game Engine ("HL
  23.   * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  24.   * L.L.C ("Valve"). You must obey the GNU General Public License in all
  25.   * respects for all of the code used other than the HL Engine and MODs
  26.   * from Valve. If you modify this file, you may extend this exception
  27.   * to your version of the file, but you are not obligated to do so. If
  28.   * you do not wish to do so, delete this exception statement from your
  29.   * version.
  30.   *
  31.   *********************************************************************************
  32.   *
  33.   * AMXX Ultimate Sounds Vers. 1.7
  34.   * Last Update: 1/26/2007
  35.   *
  36.   * by Dizzy / Bmann_420 & Hoboman
  37.   *
  38.   *
  39.   *********************************************************************************
  40.   *
  41.   * ///////////////////////////////////////////////////
  42.   * // AMXMOD[X] //
  43.   * // ::Ultimate sounds:: //
  44.   * // Origional: by Hephaistos //
  45.   * // Ported by: Dizzy //
  46.   * // Edited by: Hoboman, bmann_420 //
  47.   * // //
  48.   * // cvar: //
  49.   * // streak_mode < flags > //
  50.   * // "a" - messages //
  51.   * // "b" - sounds //
  52.   * // //
  53.   * // knife_mode < flags > //
  54.   * // "a" - messages //
  55.   * // "b" - sounds //
  56.   * // //
  57.   * // hs_mode < flags > //
  58.   * // "a" - messages //
  59.   * // "b" - sounds //
  60.   * // //
  61.   * // lastman_mode < flags > //
  62.   * // "a" - messages //
  63.   * // "b" - hp //
  64.   * // "c" - sounds //
  65.   * ///////////////////////////////////////////////////
  66.   *
  67.   *********************************************************************************
  68.   */
  69.  
  70. // Plugin Info
  71. new const PLUGIN[] = "Ultimate Sounds"
  72. new const VERSION[] = "1.7"
  73. new const AUTHOR[] = "Dizzy / Bmann_420"
  74.  
  75. // Includes
  76. #include <amxmodx>
  77.  
  78. //Defines
  79. #define KNIFEMESSAGES 5
  80. #define MESSAGESNOHP 5
  81. #define MESSAGESHP 5
  82. #define LEVELS 10
  83.  
  84. //Pcvars
  85. new streak_mode, knife_mode, hs_mode, lastman_mode
  86.  
  87. new gmsgHudSync
  88.  
  89. new kills[33] = {0,...};
  90. new deaths[33] = {0,...};
  91. new alone_ann = 0
  92. new levels[10] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
  93.  
  94. //Streak Sounds
  95. new stksounds[10][] =
  96. {
  97. "misc/multikill",
  98. "misc/megakill",
  99. "misc/ultrakill",
  100. "misc/monsterkill",
  101. "misc/killingspree",
  102. "misc/wickedsick",
  103. "misc/rampage",
  104. "misc/ludacrisskill",
  105. "misc/godlike",
  106. "misc/holyshit"
  107. }
  108.  
  109. new stkmessages[10][] =
  110. {
  111. "%s: Multi-Kill!",
  112. "%s: Mega-Kill!",
  113. "%s: Ultra-Kill!",
  114. "%s: Monster-Kill!",
  115. "%s: Killing Spree!",
  116. "%s: Wicked Sick!",
  117. "%s: Rampage!",
  118. "%s: Ludacriss-Kill",
  119. "%s: Godlike!",
  120. "%s: Holy Shit!"
  121. }
  122.  
  123.  
  124. public plugin_init()
  125. {
  126. register_plugin(PLUGIN, VERSION, AUTHOR)
  127. register_cvar("ultimate_sounds",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
  128. register_dictionary("ultimate_sounds.txt")
  129. register_event("DeathMsg","hs","a","3=1")
  130. register_event("DeathMsg","knife_kill","a","4&kni")
  131. register_event("ResetHUD", "reset_hud", "b");
  132. register_event("DeathMsg", "death_event", "a", "1>0");
  133. register_event("DeathMsg","death_msg","a")
  134. register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
  135. register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w")
  136.  
  137. lastman_mode = register_cvar("lastman_mode","abc")
  138. streak_mode = register_cvar("streak_mode","ab")
  139. knife_mode = register_cvar("knife_mode","ab")
  140. hs_mode = register_cvar("hs_mode","ab")
  141.  
  142. gmsgHudSync = CreateHudSyncObj()
  143.  
  144. return PLUGIN_CONTINUE
  145. }
  146.  
  147. get_streak()
  148. {
  149. new streak[3]
  150. get_pcvar_string(streak_mode,streak,2)
  151. return read_flags(streak)
  152. }
  153.  
  154. public death_event(id)
  155. {
  156. new streak = get_streak()
  157.  
  158. if ((streak&1) || (streak&2))
  159. {
  160. new killer = read_data(1);
  161. new victim = read_data(2);
  162.  
  163. kills[killer] += 1;
  164. kills[victim] = 0;
  165. deaths[killer] = 0;
  166. deaths[victim] += 1;
  167.  
  168. for (new i = 0; i < LEVELS; i++)
  169. {
  170. if (kills[killer] == levels[i])
  171. {
  172. announce(killer, i);
  173. return PLUGIN_CONTINUE;
  174. }
  175. }
  176. }
  177. return PLUGIN_CONTINUE;
  178. }
  179.  
  180. announce(killer, level)
  181. {
  182. new streak = get_streak()
  183.  
  184. if (streak&1)
  185. {
  186. new name[32];
  187.  
  188. get_user_name(killer, name, 32);
  189. set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2);
  190. ShowSyncHudMsg(0, gmsgHudSync, stkmessages[level], name);
  191. }
  192.  
  193. if (streak&2){
  194. for(new i=1;i<=get_maxplayers();i++)
  195. if(is_user_connected(i)==1 )
  196. client_cmd(i, "spk %s", stksounds[level]);
  197. }
  198. }
  199.  
  200. public reset_hud(id)
  201. {
  202. new streak = get_streak()
  203.  
  204. if (streak&1)
  205. {
  206.  
  207. if (kills[id] > levels[0])
  208.  
  209. {
  210. }
  211.  
  212. else if (deaths[id] > 1)
  213.  
  214. {
  215. }
  216. }
  217. }
  218.  
  219. public client_connect(id)
  220. {
  221. new streak = get_streak()
  222.  
  223. if ((streak&1) || (streak&2))
  224. {
  225. kills[id] = 0;
  226. deaths[id] = 0;
  227. }
  228. }
  229.  
  230. public knife_kill()
  231. {
  232. new knifemode[4]
  233. get_pcvar_string(knife_mode,knifemode,4)
  234. new knifemode_bit = read_flags(knifemode)
  235.  
  236. if (knifemode_bit & 1)
  237. {
  238. new killer_id = read_data(1)
  239. new victim_id = read_data(2)
  240. new killer_name[33], victim_name[33]
  241.  
  242. get_user_name(killer_id,killer_name,33)
  243. get_user_name(victim_id,victim_name,33)
  244. }
  245.  
  246. if (knifemode_bit & 2)
  247. {
  248. for(new i=1;i<=get_maxplayers();i++)
  249. if( is_user_connected(i) == 1 )
  250. client_cmd(i,"spk misc/humiliation")
  251. }
  252. }
  253.  
  254.  
  255. public roundend_msg(id)
  256.  
  257. alone_ann = 0
  258.  
  259. public death_msg(id)
  260. {
  261.  
  262. new lmmode[8]
  263. get_pcvar_string(lastman_mode,lmmode,8)
  264. new lmmode_bit = read_flags(lmmode)
  265.  
  266. new players_ct[32], players_t[32], ict, ite, last
  267. get_players(players_ct,ict,"ae","CT")
  268. get_players(players_t,ite,"ae","TERRORIST")
  269.  
  270. if (ict==1&&ite==1)
  271. {
  272. new name1[32], name2[32]
  273. get_user_name(players_ct[0],name1,32)
  274. get_user_name(players_t[0],name2,32)
  275. set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
  276.  
  277. if (lmmode_bit & 1)
  278. {
  279. if (lmmode_bit & 2)
  280. {
  281. ShowSyncHudMsg(0, gmsgHudSync, "%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))
  282. }
  283.  
  284. else
  285. {
  286. ShowSyncHudMsg(0, gmsgHudSync, "%s vs. %s",name1,name2)
  287. }
  288.  
  289. if (lmmode_bit & 4)
  290. {
  291. for(new i=1;i<=get_maxplayers();i++)
  292. if( is_user_connected(i) == 1 )
  293. client_cmd(i,"spk misc/maytheforce")
  294. }
  295. }
  296. }
  297. else
  298. {
  299. if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))
  300. {
  301. last=players_ct[0]
  302. client_cmd(last,"spk misc/oneandonly")
  303.  
  304. }
  305.  
  306. else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))
  307. {
  308. last=players_t[0]
  309. client_cmd(last,"spk misc/oneandonly")
  310. }
  311.  
  312. else
  313. {
  314. return PLUGIN_CONTINUE
  315. }
  316. alone_ann = last
  317. new name[32]
  318. get_user_name(last,name,32)
  319.  
  320. if (lmmode_bit & 1)
  321. {
  322. set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)
  323.  
  324. if (lmmode_bit & 2)
  325. {
  326. }
  327.  
  328. else
  329. {
  330. }
  331. }
  332.  
  333. }
  334. return PLUGIN_CONTINUE
  335. }
  336.  
  337.  
  338. public hs()
  339. {
  340. new hsmode[4]
  341. get_pcvar_string(hs_mode,hsmode,4)
  342. new hsmode_bit = read_flags(hsmode)
  343.  
  344. if (hsmode_bit & 1)
  345. {
  346. new killer_id = read_data(1)
  347. new victim_id = read_data(2)
  348. new victim_name[33]
  349.  
  350. get_user_name(victim_id,victim_name,33)
  351.  
  352. set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)
  353. ShowSyncHudMsg(killer_id, gmsgHudSync, "::BOOOOM-HEADSHOT::",victim_name)
  354. }
  355.  
  356. if (hsmode_bit & 2)
  357. {
  358. for(new i=1;i<=get_maxplayers();i++)
  359. if( is_user_connected(i)==1 )
  360. client_cmd(i,"spk misc/headshot")
  361. }
  362. }
  363.  
  364. public plugin_precache()
  365. {
  366. precache_sound("misc/monsterkill.wav")
  367. precache_sound("misc/godlike.wav")
  368. precache_sound("misc/headshot.wav")
  369. precache_sound("misc/humiliation.wav")
  370. precache_sound("misc/killingspree.wav")
  371. precache_sound("misc/multikill.wav")
  372. precache_sound("misc/ultrakill.wav")
  373. precache_sound("misc/maytheforce.wav")
  374. precache_sound("misc/oneandonly.wav")
  375. precache_sound("misc/rampage.wav")
  376. precache_sound("misc/holyshit.wav")
  377. precache_sound("misc/megakill.wav")
  378. precache_sound("misc/wickedsick.wav")
  379. precache_sound("misc/ludacrisskill.wav")
  380.  
  381. return PLUGIN_CONTINUE
  382. }

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


Ki van itt

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