hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.08. 13:28



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: nincs regisztrált felhasználó 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  [ 4 hozzászólás ] 
Szerző Üzenet
HozzászólásElküldve: 2014.07.27. 05:25 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4284
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 287 alkalommal
Sziasztok!

Találtam a zombiba egy olyan bugot hogy újraéledésnél nem működik a képessége. Ezt tudná nekem valaki javítani? Elég fontos lenne. Előre is köszönöm :)

SMA Forráskód: [ Mindet kijelol ]
  1. /*================================================================================
  2.  
  3. [ZP] Zombie Class: KF Siren Zombie
  4. Copyright (C) 2010 by meTaLiCroSS, Vińa del Mar, Chile
  5.  
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program. If not, see <http://www.gnu.org/licenses/>.
  18.  
  19. In addition, as a special exception, the author gives permission to
  20. link the code of this program with the Half-Life Game Engine ("HL
  21. Engine") and Modified Game Libraries ("MODs") developed by Valve,
  22. L.L.C ("Valve"). You must obey the GNU General Public License in all
  23. respects for all of the code used other than the HL Engine and MODs
  24. from Valve. If you modify this file, you may extend this exception
  25. to your version of the file, but you are not obligated to do so. If
  26. you do not wish to do so, delete this exception statement from your
  27. version.
  28.  
  29. =================================================================================*/
  30.  
  31. #include <amxmodx>
  32. #include <engine>
  33. #include <fakemeta>
  34. #include <fun>
  35. #include <xs>
  36. #include <hamsandwich>
  37. #include <zombieplague>
  38.  
  39. /*================================================================================
  40.  [Customizations]
  41. =================================================================================*/
  42.  
  43. // Zombie Attributes
  44. new const zclass_name[] = "Sikoly Zombie" // name
  45. new const zclass_info[] = "Sikitani tud az E betuvel" // description
  46. new const zclass_model[] = "zombie_source" // model
  47. new const zclass_clawmodel[] = "v_knife_zombie.mdl" // claw model
  48. new const zclass_ring_sprite[] = "sprites/shockwave.spr" // ring sprite
  49. new const zclass_screamsounds[][] = { "killing_floor/siren_scream.wav" } // scream sound
  50.  
  51. // Scream ring color R G B
  52. new zclass_ring_colors[3] = { 255, 0, 0 }
  53.  
  54. const zclass_health = 2000 // health
  55. const zclass_speed = 170 // speed
  56.  
  57. const Float:zclass_gravity = 0.5 // gravity
  58. const Float:zclass_knockback = 2.0 // knockback
  59.  
  60. /*================================================================================
  61.  Customization ends here! Yes, that's it. Editing anything beyond
  62.  here is not officially supported. Proceed at your own risk...
  63. =================================================================================*/
  64.  
  65. // Variables
  66. new g_iSirenZID, g_iMaxPlayers, g_msgSayText, g_msgScreenFade, g_msgScreenShake,
  67. g_msgBarTime, g_sprRing
  68.  
  69. // Arrays
  70. new g_iPlayerTaskTimes[33]
  71.  
  72. // Cvar pointers
  73. new cvar_screammode, cvar_duration, cvar_screamdmg, cvar_startime, cvar_reloadtime,
  74. cvar_radius, cvar_damagemode, cvar_slowdown
  75.  
  76. // Cached cvars
  77. new g_iCvar_ScreamMode, g_iCvar_ScreamDuration, g_iCvar_ScreamDmg,
  78. g_iCvar_ScreamStartTime, Float:g_flCvar_ReloadTime, Float:g_flCvar_Radius,
  79. g_iCvar_DamageMode, Float:g_flCvar_ScreamSlowdown
  80.  
  81. // Bools
  82. new bool:g_bIsConnected[33], bool:g_bIsAlive[33], bool:g_bInScreamProcess[33],
  83. bool:g_bCanDoScreams[33], bool:g_bKilledByScream[33], bool:g_bDoingScream[33],
  84. bool:g_bRoundEnding
  85.  
  86. // Some constants
  87. const FFADE_IN = 0x0000
  88. const GIB_NEVER = 0
  89. const UNIT_SECOND = (1<<12)
  90. const TASK_SCREAM = 37729
  91. const TASK_RELOAD = 55598
  92. const TASK_SCREAMDMG = 48289
  93. const NADE_TYPE_INFECTION = 1111
  94.  
  95. // Plug info.
  96. #define PLUG_VERSION "0.2"
  97. #define PLUG_AUTH "meTaLiCroSS"
  98.  
  99. // Macros
  100. #define zp_get_grenade_type(%1) (entity_get_int(%1, EV_INT_flTimeStepSound))
  101. #define is_user_valid_alive(%1) (1 <= %1 <= g_iMaxPlayers && g_bIsAlive[%1])
  102. #define is_user_valid_connected(%1) (1 <= %1 <= g_iMaxPlayers && g_bIsConnected[%1])
  103.  
  104. /*================================================================================
  105.  [Init, CFG and Precache]
  106. =================================================================================*/
  107.  
  108. public plugin_init()
  109. {
  110. // Plugin Info
  111. register_plugin("[ZP] Zombie Class: KF Siren Zombie", PLUG_VERSION, PLUG_AUTH)
  112.  
  113. // Main events
  114. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  115.  
  116. // Main messages
  117. register_message(get_user_msgid("DeathMsg"), "message_DeathMsg")
  118.  
  119. // Fakemeta Forwards
  120. register_forward(FM_CmdStart, "fw_CmdStart")
  121.  
  122. // Hamsandwich Forward
  123. RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
  124. RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
  125.  
  126. // Cvars
  127. cvar_screammode = register_cvar("zp_siren_mode", "0")
  128. cvar_duration = register_cvar("zp_siren_scream_duration", "3")
  129. cvar_screamdmg = register_cvar("zp_siren_scream_damage", "2")
  130. cvar_startime = register_cvar("zp_siren_scream_start_time", "1")
  131. cvar_reloadtime = register_cvar("zp_siren_scream_reload_time", "30.0")
  132. cvar_radius = register_cvar("zp_siren_scream_radius", "250.0")
  133. cvar_damagemode = register_cvar("zp_siren_damage_mode", "0")
  134. cvar_slowdown = register_cvar("zp_siren_damage_slowdown", "0.5")
  135.  
  136. static szCvar[30]
  137. formatex(szCvar, charsmax(szCvar), "v%s by %s", PLUG_VERSION, PLUG_AUTH)
  138. register_cvar("zp_zclass_siren", szCvar, FCVAR_SERVER|FCVAR_SPONLY)
  139.  
  140. // Vars
  141. g_iMaxPlayers = get_maxplayers()
  142. g_msgBarTime = get_user_msgid("BarTime")
  143. g_msgSayText = get_user_msgid("SayText")
  144. g_msgScreenFade = get_user_msgid("ScreenFade")
  145. g_msgScreenShake = get_user_msgid("ScreenShake")
  146. }
  147.  
  148. public plugin_cfg()
  149. {
  150. // Cache some cvars
  151. cache_cvars()
  152. }
  153.  
  154. public plugin_precache()
  155. {
  156. // Register the new class and store ID for reference
  157. g_iSirenZID = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
  158.  
  159. // Ring sprite
  160. g_sprRing = precache_model(zclass_ring_sprite)
  161.  
  162. // Sounds
  163. static i
  164. for(i = 0; i < sizeof zclass_screamsounds; i++)
  165. precache_sound(zclass_screamsounds[i])
  166. }
  167.  
  168. /*================================================================================
  169.  [Main Events/Messages]
  170. =================================================================================*/
  171.  
  172. public event_RoundStart()
  173. {
  174. // Caching cvars
  175. cache_cvars()
  176.  
  177. // Reset round end bar
  178. g_bRoundEnding = false
  179. }
  180.  
  181. public message_DeathMsg(msg_id, msg_dest, id)
  182. {
  183. static iAttacker, iVictim
  184.  
  185. // Get attacker and victim
  186. iAttacker = get_msg_arg_int(1)
  187. iVictim = get_msg_arg_int(2)
  188.  
  189. // Non-player attacker or self kill
  190. if(!is_user_connected(iAttacker) || iAttacker == iVictim)
  191. return PLUGIN_CONTINUE
  192.  
  193. // Killed by siren scream
  194. if(g_bKilledByScream[iVictim])
  195. set_msg_arg_string(4, "siren scream")
  196.  
  197. return PLUGIN_CONTINUE
  198. }
  199.  
  200. /*================================================================================
  201.  [Main Forwards]
  202. =================================================================================*/
  203.  
  204. public client_putinserver(id)
  205. {
  206. // Updating bool
  207. g_bIsConnected[id] = true
  208. }
  209.  
  210. public client_disconnect(id)
  211. {
  212. // Updating bool
  213. g_bIsAlive[id] = false
  214. g_bIsConnected[id] = false
  215. }
  216.  
  217. public fw_PlayerSpawn_Post(id)
  218. {
  219. // Not alive...
  220. if(!is_user_alive(id))
  221. return HAM_IGNORED
  222.  
  223. // Player is alive
  224. g_bIsAlive[id] = true
  225.  
  226. // Reset player vars and tasks
  227. stop_scream_task(id)
  228.  
  229. g_bCanDoScreams[id] = false
  230. g_bDoingScream[id] = false
  231. g_iPlayerTaskTimes[id] = 0
  232.  
  233. remove_task(id+TASK_RELOAD)
  234. remove_task(id+TASK_SCREAMDMG)
  235.  
  236. return HAM_IGNORED
  237. }
  238.  
  239. public fw_PlayerKilled(victim, attacker, shouldgib)
  240. {
  241. // Player victim
  242. if(is_user_valid_connected(victim))
  243. {
  244. // Victim is not alive
  245. g_bIsAlive[victim] = false
  246.  
  247. // Reset player vars and tasks
  248. stop_scream_task(victim)
  249.  
  250. g_bCanDoScreams[victim] = false
  251. g_bDoingScream[victim] = false
  252. g_iPlayerTaskTimes[victim] = 0
  253.  
  254. remove_task(victim+TASK_RELOAD)
  255. remove_task(victim+TASK_SCREAMDMG)
  256.  
  257. return HAM_HANDLED
  258. }
  259.  
  260. return HAM_IGNORED
  261. }
  262.  
  263. public fw_CmdStart(id, handle, random_seed)
  264. {
  265. // Not alive
  266. if(!is_user_alive(id))
  267. return FMRES_IGNORED;
  268.  
  269. // Isn't a zombie?
  270. if(!zp_get_user_zombie(id) || zp_get_user_nemesis(id))
  271. return FMRES_IGNORED;
  272.  
  273. // Invalid class id
  274. if(zp_get_user_zombie_class(id) != g_iSirenZID)
  275. return FMRES_IGNORED;
  276.  
  277. // Get user old and actual buttons
  278. static iInUseButton, iInUseOldButton
  279. iInUseButton = (get_uc(handle, UC_Buttons) & IN_USE)
  280. iInUseOldButton = (get_user_oldbutton(id) & IN_USE)
  281.  
  282. // Pressing +use button
  283. if(iInUseButton)
  284. {
  285. // Last used button isn't +use, i need to
  286. // do this, because i call this "only" 1 time
  287. if(!iInUseOldButton && g_bCanDoScreams[id] && !g_bDoingScream[id] && !g_bRoundEnding)
  288. {
  289. // A bar appears in his screen
  290. message_begin(MSG_ONE, g_msgBarTime, _, id)
  291. write_byte(g_iCvar_ScreamStartTime) // time
  292. write_byte(0) // unknown
  293. message_end()
  294.  
  295. // Update bool
  296. g_bInScreamProcess[id] = true
  297.  
  298. // Next scream time
  299. set_task(g_iCvar_ScreamStartTime + 0.2, "task_do_scream", id+TASK_SCREAM)
  300.  
  301. return FMRES_HANDLED
  302. }
  303. }
  304. else
  305. {
  306. // Last used button it's +use
  307. if(iInUseOldButton && g_bInScreamProcess[id])
  308. {
  309. // Stop scream main task
  310. stop_scream_task(id)
  311.  
  312. return FMRES_HANDLED
  313. }
  314. }
  315.  
  316. return FMRES_IGNORED
  317. }
  318.  
  319. /*================================================================================
  320.  [Tasks]
  321. =================================================================================*/
  322.  
  323. public task_do_scream(id)
  324. {
  325. // Normalize task
  326. id -= TASK_SCREAM
  327.  
  328. // Do scream sound
  329. emit_sound(id, CHAN_STREAM, zclass_screamsounds[random_num(0, sizeof zclass_screamsounds - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
  330.  
  331. // Block screams
  332. g_bCanDoScreams[id] = false
  333.  
  334. // Reload task
  335. set_task(g_flCvar_ReloadTime, "task_reload_scream", id+TASK_RELOAD)
  336.  
  337. // Now it's doing an scream
  338. g_bDoingScream[id] = true
  339.  
  340. // Get his origin coords
  341. static iOrigin[3]
  342. get_user_origin(id, iOrigin)
  343.  
  344. // Do a good effect, life the original Killing Floor.
  345. message_begin(MSG_PVS, SVC_TEMPENTITY, iOrigin)
  346. write_byte(TE_LAVASPLASH)
  347. write_coord(iOrigin[0])
  348. write_coord(iOrigin[1])
  349. write_coord(iOrigin[2])
  350. message_end()
  351.  
  352. // Scream damage task
  353. set_task(0.1, "task_scream_process", id+TASK_SCREAMDMG, _, _, "b")
  354. }
  355.  
  356. public task_reload_scream(id)
  357. {
  358. // Normalize taks
  359. id -= TASK_RELOAD
  360.  
  361. // Can do screams again
  362. g_bCanDoScreams[id] = true
  363.  
  364. // Message
  365. client_printcolor(id, "/g[ZP]/y Ujra Sikithatsz!")
  366. client_printcolor(id, "/g[ZP]/y Emlekezteto: Az E betuvel tudsz sikitani!")
  367. }
  368.  
  369. public task_scream_process(id)
  370. {
  371. // Normalize task
  372. id -= TASK_SCREAMDMG
  373.  
  374. // Time exceed
  375. if(g_iPlayerTaskTimes[id] >= (g_iCvar_ScreamDuration*10) || g_bRoundEnding)
  376. {
  377. // Remove player task
  378. remove_task(id+TASK_SCREAMDMG)
  379.  
  380. // Reset task times count
  381. g_iPlayerTaskTimes[id] = 0
  382.  
  383. // Update bool
  384. g_bDoingScream[id] = false
  385.  
  386. return;
  387. }
  388.  
  389. // Update player task time
  390. g_iPlayerTaskTimes[id]++
  391.  
  392. // Get player origin
  393. static Float:flOrigin[3]
  394. entity_get_vector(id, EV_VEC_origin, flOrigin)
  395.  
  396. // Collisions
  397. static iVictim
  398. iVictim = -1
  399.  
  400. // Vector var
  401. static Float:flVictimOrigin[3]
  402.  
  403. // A ring effect
  404. engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flOrigin, 0)
  405. write_byte(TE_BEAMCYLINDER) // TE id
  406. engfunc(EngFunc_WriteCoord, flOrigin[0]) // x
  407. engfunc(EngFunc_WriteCoord, flOrigin[1]) // y
  408. engfunc(EngFunc_WriteCoord, flOrigin[2]) // z
  409. engfunc(EngFunc_WriteCoord, flOrigin[0]) // x axis
  410. engfunc(EngFunc_WriteCoord, flOrigin[1]) // y axis
  411. engfunc(EngFunc_WriteCoord, flOrigin[2] + g_flCvar_Radius) // z axis
  412. write_short(g_sprRing) // sprite
  413. write_byte(0) // startframe
  414. write_byte(0) // framerate
  415. write_byte(10) // life
  416. write_byte(25) // width
  417. write_byte(0) // noise
  418. write_byte(zclass_ring_colors[0]) // red
  419. write_byte(zclass_ring_colors[1]) // green
  420. write_byte(zclass_ring_colors[2]) // blue
  421. write_byte(200) // brightness
  422. write_byte(0) // speed
  423. message_end()
  424.  
  425. // Screen effects for him self
  426. screen_effects(id)
  427.  
  428. // Do scream effects
  429. while((iVictim = find_ent_in_sphere(iVictim, flOrigin, g_flCvar_Radius)) != 0)
  430. {
  431. // Non-player entity
  432. if(!is_user_valid_connected(iVictim))
  433. {
  434. // Validation check
  435. if(is_valid_ent(iVictim))
  436. {
  437. // Get entity classname
  438. static szClassname[33]
  439. entity_get_string(iVictim, EV_SZ_classname, szClassname, charsmax(szClassname))
  440.  
  441. // It's a grenade, and isn't an Infection Bomb
  442. if(equal(szClassname, "grenade") && zp_get_grenade_type(iVictim) != NADE_TYPE_INFECTION)
  443. {
  444. // Get grenade origin
  445. entity_get_vector(iVictim, EV_VEC_origin, flVictimOrigin)
  446.  
  447. // Do a good effect
  448. engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flVictimOrigin, 0)
  449. write_byte(TE_PARTICLEBURST) // TE id
  450. engfunc(EngFunc_WriteCoord, flVictimOrigin[0]) // x
  451. engfunc(EngFunc_WriteCoord, flVictimOrigin[1]) // y
  452. engfunc(EngFunc_WriteCoord, flVictimOrigin[2]) // z
  453. write_short(45) // radius
  454. write_byte(108) // particle color
  455. write_byte(10) // duration * 10 will be randomized a bit
  456. message_end()
  457.  
  458. // Remove it
  459. remove_entity(iVictim)
  460. }
  461. // If i don't check his solid type, it's used all the time.
  462. else if(equal(szClassname, "func_breakable") && entity_get_int(iVictim, EV_INT_solid) != SOLID_NOT)
  463. {
  464. // Destroy entity if he can
  465. force_use(id, iVictim)
  466. }
  467. }
  468.  
  469. continue;
  470. }
  471.  
  472. // Not alive, zombie or with Godmode
  473. if(!g_bIsAlive[iVictim] || zp_get_user_zombie(iVictim) || get_user_godmode(iVictim))
  474. continue;
  475.  
  476. // Screen effects for victims
  477. screen_effects(iVictim)
  478.  
  479. // Get scream mode
  480. switch(g_iCvar_ScreamMode)
  481. {
  482. // Do damage
  483. case 0:
  484. {
  485. // Scream slowdown, first should be enabled
  486. if(g_flCvar_ScreamSlowdown > 0.0)
  487. {
  488. // Get his current velocity vector
  489. static Float:flVelocity[3]
  490. get_user_velocity(iVictim, flVelocity)
  491.  
  492. // Multiply his velocity by a number
  493. xs_vec_mul_scalar(flVelocity, g_flCvar_ScreamSlowdown, flVelocity)
  494.  
  495. // Set his new velocity vector
  496. set_user_velocity(iVictim, flVelocity)
  497. }
  498.  
  499. // Get damage result
  500. static iNewHealth
  501. iNewHealth = max(0, get_user_health(iVictim) - g_iCvar_ScreamDmg)
  502.  
  503. // Does not has health
  504. if(!iNewHealth)
  505. {
  506. // Be infected when it's going to die
  507. if(g_iCvar_DamageMode /* == 1*/)
  508. {
  509. // Returns 1 on sucess...
  510. if(zp_infect_user(iVictim, id, 0, 1))
  511. continue
  512. }
  513.  
  514. // Kill it
  515. scream_kill(iVictim, id)
  516.  
  517. continue
  518. }
  519.  
  520. // Do fake damage
  521. set_user_health(iVictim, iNewHealth)
  522. }
  523.  
  524. // Instantly Infect
  525. case 1:
  526. {
  527. // Can be infected?
  528. if(!zp_infect_user(iVictim, id, 0, 1))
  529. {
  530. // Kill it
  531. scream_kill(iVictim, id)
  532. }
  533. }
  534.  
  535. // Instantly Kill
  536. case 2:
  537. {
  538. // Kill it
  539. scream_kill(iVictim, id)
  540. }
  541. }
  542.  
  543. }
  544. }
  545.  
  546. /*================================================================================
  547.  [Zombie Plague Forwards]
  548. =================================================================================*/
  549.  
  550. public zp_user_infected_post(id, infector)
  551. {
  552. // It's the selected zombie class
  553. if(zp_get_user_zombie_class(id) == g_iSirenZID && !zp_get_user_nemesis(id))
  554. {
  555. // Array
  556. g_bCanDoScreams[id] = true
  557.  
  558. // Message
  559. client_printcolor(id, "/g[ZP]/y Te kivalasztottad a Sikoly Zombie fajt! Az E betuvel sikithatsz!")
  560. }
  561. }
  562.  
  563. public zp_user_humanized_post(id)
  564. {
  565. // Reset player vars and tasks
  566. stop_scream_task(id)
  567.  
  568. g_bCanDoScreams[id] = false
  569. g_bDoingScream[id] = false
  570. g_iPlayerTaskTimes[id] = 0
  571.  
  572. remove_task(id+TASK_RELOAD)
  573. remove_task(id+TASK_SCREAMDMG)
  574. }
  575.  
  576. public zp_round_ended(winteam)
  577. {
  578. // Update bool
  579. g_bRoundEnding = true
  580.  
  581. // Make a loop
  582. static id
  583. for(id = 1; id <= g_iMaxPlayers; id++)
  584. {
  585. // Valid connected
  586. if(is_user_valid_connected(id))
  587. {
  588. // Remove mainly tasks
  589. stop_scream_task(id)
  590. remove_task(id+TASK_RELOAD)
  591. }
  592. }
  593. }
  594.  
  595. /*================================================================================
  596.  [Internal Functions]
  597. =================================================================================*/
  598.  
  599. stop_scream_task(id)
  600. {
  601. // Remove the task
  602. if(task_exists(id+TASK_SCREAM))
  603. {
  604. remove_task(id+TASK_SCREAM)
  605.  
  606. // Remove screen's bar
  607. message_begin(MSG_ONE, g_msgBarTime, _, id)
  608. write_byte(0) // time
  609. write_byte(0) // unknown
  610. message_end()
  611.  
  612. // Update bool
  613. g_bInScreamProcess[id] = false
  614. }
  615. }
  616.  
  617. screen_effects(id)
  618. {
  619. // Screen Fade
  620. message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id)
  621. write_short(UNIT_SECOND*1) // duration
  622. write_short(UNIT_SECOND*1) // hold time
  623. write_short(FFADE_IN) // fade type
  624. write_byte(200) // r
  625. write_byte(0) // g
  626. write_byte(0) // b
  627. write_byte(125) // alpha
  628. message_end()
  629.  
  630. // Screen Shake
  631. message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, id)
  632. write_short(UNIT_SECOND*5) // amplitude
  633. write_short(UNIT_SECOND*1) // duration
  634. write_short(UNIT_SECOND*5) // frequency
  635. message_end()
  636. }
  637.  
  638. cache_cvars()
  639. {
  640. g_iCvar_ScreamMode = get_pcvar_num(cvar_screammode)
  641. g_iCvar_ScreamDuration = get_pcvar_num(cvar_duration)
  642. g_iCvar_ScreamDmg = get_pcvar_num(cvar_screamdmg)
  643. g_iCvar_ScreamStartTime = get_pcvar_num(cvar_startime)
  644. g_iCvar_DamageMode = get_pcvar_num(cvar_damagemode)
  645. g_flCvar_ReloadTime = floatmax(g_iCvar_ScreamDuration+0.0, get_pcvar_float(cvar_reloadtime))
  646. g_flCvar_Radius = get_pcvar_float(cvar_radius)
  647. g_flCvar_ScreamSlowdown = get_pcvar_float(cvar_slowdown)
  648. }
  649.  
  650. scream_kill(victim, attacker)
  651. {
  652. // To use later in DeathMsg event
  653. g_bKilledByScream[victim] = true
  654.  
  655. // Do kill
  656. ExecuteHamB(Ham_Killed, victim, attacker, GIB_NEVER)
  657.  
  658. // We don't need this
  659. g_bKilledByScream[victim] = false
  660. }
  661.  
  662. /*================================================================================
  663.  [Stocks]
  664. =================================================================================*/
  665.  
  666. stock client_printcolor(id, const input[], any:...)
  667. {
  668. static iPlayersNum[32], iCount; iCount = 1
  669. static szMsg[191]
  670.  
  671. vformat(szMsg, charsmax(szMsg), input, 3)
  672.  
  673. replace_all(szMsg, 190, "/g", "^4") // green txt
  674. replace_all(szMsg, 190, "/y", "^1") // orange txt
  675. replace_all(szMsg, 190, "/ctr", "^3") // team txt
  676. replace_all(szMsg, 190, "/w", "^0") // team txt
  677.  
  678. if(id) iPlayersNum[0] = id
  679. else get_players(iPlayersNum, iCount, "ch")
  680.  
  681. for (new i = 0; i < iCount; i++)
  682. {
  683. if (g_bIsConnected[iPlayersNum[i]])
  684. {
  685. message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayersNum[i])
  686. write_byte(iPlayersNum[i])
  687. write_string(szMsg)
  688. message_end()
  689. }
  690. }
  691. }
  692.  

_________________
<<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ásElküldve: 2014.07.28. 05:20 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4284
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 287 alkalommal
utólag szólok hogy megoldva! Ham_spawn részeket törölni kellett.

_________________
<<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ásElküldve: 2017.05.07. 21:59 
Offline
Beavatott
Avatar

Csatlakozott: 2016.12.26. 20:51
Hozzászólások: 96
Megköszönt másnak: 16 alkalommal
Megköszönték neki: 2 alkalommal
Szia!
Ha kitörlöm akkor nem sebez.

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
HozzászólásElküldve: 2017.05.07. 23:18 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4284
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 287 alkalommal
Nagyon jó kérdés már, hogy volt-e későbbiekben változtatva rajta, de az sem rémlik, hogy tökéletesen működött volna. Viszont ha írtam, hogy csak annyi akkor elején biztos jól működött.

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


Ki van itt

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