hlmod.hu

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



Jelenlévő felhasználók

Jelenleg 341 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 339 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  [3 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Nitrogén Galil Pubra
HozzászólásElküldve:2012.10.05. 16:50 
Offline
Jómunkásember
Avatar

Csatlakozott:2012.09.23. 20:29
Hozzászólások:325
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 87 alkalommal
Hellosztok!

Valaki áttudná írni nekem a Nitrogén galilt pubra?
Ha kérhetem akkor úgy ,hogy lehessen adni.


Előre Is köszönöm! :D


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nitrogén Galil Pubra
HozzászólásElküldve:2012.10.05. 17:49 
Offline
Developer
Avatar

Csatlakozott:2011.06.01. 21:11
Hozzászólások:7966
Megköszönt másnak: 295 alkalommal
Megköszönték neki: 537 alkalommal
Forráskód?

_________________
http://www.easyrankup.eu


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Nitrogén Galil Pubra
HozzászólásElküldve:2012.10.05. 18:00 
Offline
Jómunkásember
Avatar

Csatlakozott:2012.09.23. 20:29
Hozzászólások:325
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 87 alkalommal
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <zombieplague>
  4. #include <fakemeta>
  5. #include <cstrike>
  6. #include <engine>
  7. #include <fun>
  8.  
  9.  
  10. new gc_itemID
  11. new bool:g_NitrogenGalil[33]
  12. new g_CurrentWeapon[33]
  13. new g_FrozeN[33]
  14. new NitrogenGalilSpr
  15. new g_msgScreenFade
  16. new g_iMaxPlayers
  17. new g_HudSync
  18. new FrostTime
  19. new BackSpeed
  20.  
  21. const UNIT_SECOND = (1<<12)
  22.  
  23. public plugin_init()
  24. {
  25. register_plugin("[ZP] Extra Item: Nitrogen Galil", "2.02", "metallicawOw #")
  26.  
  27. FrostTime = register_cvar("zp_ng_frost_time", "5.0") // Time to Remove the Frost Effect
  28. BackSpeed = register_cvar("zp_ng_back_spd", "250.0") // The Speed that Victim Recieve when g_FrozeN is false
  29.  
  30. g_HudSync = CreateHudSyncObj()
  31. g_iMaxPlayers = get_maxplayers()
  32. g_msgScreenFade = get_user_msgid("ScreenFade")
  33.  
  34. gc_itemID = zp_register_extra_item("Nitrogen Galil", 40, ZP_TEAM_HUMAN)
  35.  
  36. register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
  37. register_event("CurWeapon", "event_CurWeapon", "b", "1=1")
  38.  
  39. register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
  40.  
  41. RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
  42.  
  43. register_dictionary("nitrogen_galil.txt")
  44.  
  45. }
  46.  
  47.  
  48. public plugin_precache()
  49. {
  50. // Models
  51. precache_model("models/zombie_plague/v_nitrogen_galil.mdl");
  52.  
  53. // Sounds
  54. precache_sound("warcraft3/impalehit.wav");
  55.  
  56. // Sprites
  57. NitrogenGalilSpr = precache_model("sprites/shockwave.spr");
  58. }
  59.  
  60. public client_putinserver(id)
  61. {
  62. g_NitrogenGalil[id] = false
  63. g_FrozeN[id] = false
  64. }
  65.  
  66. public client_disconnect(id)
  67. {
  68. g_NitrogenGalil[id] = false
  69. g_FrozeN[id] = false
  70. }
  71.  
  72. public zp_extra_item_selected(player, itemid)
  73. {
  74. if (itemid == gc_itemID)
  75. {
  76. client_print(player, print_chat, "%L", LANG_PLAYER, "PURCHASE_NG")
  77.  
  78. g_NitrogenGalil[player] = true
  79.  
  80. strip_user_weapons(player)
  81.  
  82. give_item(player, "weapon_knife")
  83.  
  84. give_item(player, "weapon_galil")
  85.  
  86. cs_set_user_bpammo(player, CSW_GALIL, 300)
  87.  
  88. new gcName[32]
  89.  
  90. get_user_name(player, gcName, charsmax(gcName))
  91.  
  92. set_hudmessage(34, 138, 255, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
  93.  
  94. ShowSyncHudMsg(0, g_HudSync, "%L", LANG_PLAYER, "NOTICE_NG", gcName)
  95. }
  96. }
  97.  
  98. public zp_user_infected_post(infected, infector)
  99. {
  100. if (g_NitrogenGalil[infected])
  101. {
  102. g_NitrogenGalil[infected] = false
  103. }
  104. }
  105.  
  106.  
  107. public event_round_start()
  108. {
  109. for (new i = 1; i <= g_iMaxPlayers; i++)
  110. {
  111. if (!is_user_connected(i))
  112. continue
  113.  
  114. if (g_NitrogenGalil[i])
  115. {
  116. g_NitrogenGalil[i] = false
  117. }
  118. if(g_FrozeN[i])
  119. {
  120. g_FrozeN[i] = false
  121. }
  122. }
  123. }
  124.  
  125. public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
  126. {
  127. if(!is_user_connected(attacker) || !is_user_connected(victim) || zp_get_user_nemesis(victim) || attacker == victim || !attacker)
  128. return HAM_IGNORED
  129.  
  130. static Float:originF[3]
  131. pev(victim, pev_origin, originF)
  132.  
  133. static originF2[3]
  134. get_user_origin(victim, originF2)
  135.  
  136. if (g_NitrogenGalil[attacker] && get_user_weapon(attacker) == CSW_GALIL)
  137. {
  138. FrostEffect(victim)
  139.  
  140. FrostEffectRing(originF)
  141.  
  142. FrostEffectSound(originF2)
  143.  
  144. client_print(attacker, print_center, "%L", LANG_PLAYER, "ENEMY_FROST_NG")
  145. }
  146. else
  147. {
  148. if(g_NitrogenGalil[attacker])
  149. {
  150. client_print(attacker, print_center, "%L", LANG_PLAYER, "ONLY_NG")
  151. }
  152. }
  153.  
  154.  
  155. if(zp_get_user_nemesis(victim))
  156. {
  157. client_print(attacker, print_center, "%L", LANG_PLAYER, "NEMESIS_INMUNE_NG")
  158.  
  159. return HAM_IGNORED
  160. }
  161. return PLUGIN_HANDLED;
  162. }
  163.  
  164. public event_CurWeapon(id)
  165. {
  166. if (!is_user_alive(id))
  167. return PLUGIN_CONTINUE
  168.  
  169. g_CurrentWeapon[id] = read_data(2)
  170.  
  171. if(zp_get_user_zombie(id) || zp_get_user_survivor(id))
  172. return PLUGIN_CONTINUE
  173.  
  174. if(!g_NitrogenGalil[id] || g_CurrentWeapon[id] != CSW_GALIL)
  175. return PLUGIN_CONTINUE
  176.  
  177. entity_set_string(id, EV_SZ_viewmodel, "models/zombie_plague/v_nitrogen_galil.mdl")
  178.  
  179. return PLUGIN_CONTINUE
  180. }
  181.  
  182. public fw_PlayerPreThink(id)
  183. {
  184. if (!is_user_alive(id))
  185. return;
  186.  
  187. if (g_FrozeN[id])
  188. {
  189. set_pev(id, pev_velocity, Float:{0.0,0.0,0.0}) // stop motion
  190. set_pev(id, pev_maxspeed, 1.0) // prevent from moving
  191. }
  192. else
  193. {
  194. set_pev(id, pev_maxspeed, get_pcvar_float(BackSpeed)) // Change this in Cvar if you Want
  195. }
  196. }
  197. public FrostEffect(id)
  198. {
  199. if (!is_user_alive(id) || !zp_get_user_zombie(id) || g_FrozeN[id])
  200. return;
  201.  
  202. message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id)
  203. write_short(UNIT_SECOND*1) // duration
  204. write_short(UNIT_SECOND*1) // hold time
  205. write_short(0x0000) // fade type
  206. write_byte(0) // red
  207. write_byte(50) // green
  208. write_byte(200) // blue
  209. write_byte(100) // alpha
  210. message_end()
  211.  
  212. #if defined HANDLE_MODELS_ON_SEPARATE_ENT
  213. fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShell, 0, 100, 200, kRenderNormal, 25)
  214. #else
  215. fm_set_rendering(id, kRenderFxGlowShell, 0, 100, 200, kRenderNormal, 25)
  216. #endif
  217.  
  218. g_FrozeN[id] = true
  219. set_task(get_pcvar_float(FrostTime), "RemoveFrost", id) // Time to Remove Frost Effect
  220. }
  221.  
  222. public FrostEffectSound(iOrigin[3])
  223. {
  224. new iEnt = create_entity("info_target")
  225.  
  226. new Float:flOrigin[3]
  227. IVecFVec(iOrigin, flOrigin)
  228.  
  229. entity_set_origin(iEnt, flOrigin)
  230.  
  231. emit_sound(iEnt, CHAN_WEAPON, "warcraft3/impalehit.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
  232.  
  233. remove_entity(iEnt)
  234. }
  235.  
  236. FrostEffectRing(const Float:originF3[3])
  237. {
  238. engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, originF3, 0)
  239. write_byte(TE_BEAMCYLINDER) // TE id
  240. engfunc(EngFunc_WriteCoord, originF3[0]) // x
  241. engfunc(EngFunc_WriteCoord, originF3[1]) // y
  242. engfunc(EngFunc_WriteCoord, originF3[2]) // z
  243. engfunc(EngFunc_WriteCoord, originF3[0]) // x axis
  244. engfunc(EngFunc_WriteCoord, originF3[1]) // y axis
  245. engfunc(EngFunc_WriteCoord, originF3[2]+100.0) // z axis
  246. write_short(NitrogenGalilSpr) // sprite
  247. write_byte(0) // startframe
  248. write_byte(0) // framerate
  249. write_byte(4) // life
  250. write_byte(60) // width
  251. write_byte(0) // noise
  252. write_byte(41) // red
  253. write_byte(138) // green
  254. write_byte(255) // blue
  255. write_byte(200) // brightness
  256. write_byte(0) // speed
  257. message_end()
  258. }
  259.  
  260. public RemoveFrost(id)
  261. {
  262. if (!is_user_alive(id) || !g_FrozeN[id])
  263. return;
  264.  
  265. g_FrozeN[id] = false;
  266.  
  267. #if defined HANDLE_MODELS_ON_SEPARATE_ENT
  268. fm_set_rendering(g_ent_playermodel[id])
  269. #else
  270. fm_set_rendering(id)
  271. #endif
  272. }
  273.  
  274. stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
  275. {
  276. static Float:color[3]
  277. color[0] = float(r)
  278. color[1] = float(g)
  279. color[2] = float(b)
  280.  
  281. set_pev(entity, pev_renderfx, fx)
  282. set_pev(entity, pev_rendercolor, color)
  283. set_pev(entity, pev_rendermode, render)
  284. set_pev(entity, pev_renderamt, float(amount))
  285. }
  286.  


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 9 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