HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*-------------------------------------------------------------------------------------------------*
  2.  
  3. [ Zombie Plague Plugin Addon: Counter-Strike Online In-Game Theme ]
  4.  
  5. [ By jc980 ]
  6.  
  7. Description:
  8.  
  9. - Adds Countdown And Warning Sounds And Round Start Sounds
  10. And Ambience Sounds Kill Effects. And A New Respawn System,
  11. When You Kill A Zombie, You Have A Head Shot On Him To Stop
  12. Respawning. When Last Human, You Are ONE HIT. Also The Level
  13. System Can Help Humans And Zombies Become Invincible. Evolutions
  14. Adds Health And Armor. While Damage Fire Power Lesses Recoil And
  15. Adds More Damage Per Level.
  16.  
  17. Changelog:
  18.  
  19. - 0.1 - Countdown Added
  20. - 0.2 - Sounds Added
  21. - 0.3 - Warning Added
  22. - 0.4 - Infection Warning Added
  23. - 0.5 - Round Start Music Added
  24. - 0.6 - Ambience Sound Added
  25. - 0.7 - ZP Round Start Warning Added
  26. - 0.8 - Fixed Problem At zp_user_infected_post
  27. - 0.9 - Optimization
  28. - 1.0 - Tested Plugin
  29. - 1.1 - Countdown Fix
  30. - 1.2 - Sound Fix
  31. - 1.3 - Re-Optimization
  32. - 1.4 - Emit Sound Fix
  33. - 1.5 - Re-Optimization
  34. - 1.6 - Added NVault
  35. - 1.7 - Points And Kills
  36. - 1.8 - Countdown Sound Re-Fix
  37. - 1.9 - Kill Streaks
  38. - 2.0 - Fixed Kill Streak On Infect
  39. - 2.1 - Changed Nick To IP Save Method
  40. - 2.2 - Fixed Double Kill Sound
  41. - 2.3 - Added Limited Time Before Kill Streak Disappears
  42. - 2.4 - HUD Problem Fixed
  43. - 2.5 - Kill Type Problem Fixed
  44. - 2.6 - Changed Fix Emit_Sound With Speak
  45. - 2.7 - Re-Optimization
  46. - 2.8 - Countdown Runtime Error Fix
  47. - 2.9 - added Scoreboard
  48. - 3.0 - Re-Optimization
  49. - 3.1 - Changed All Emit_Sound To Speak
  50. - 3.2 - Added Respawn System
  51. - 3.3 - Added Respawn Sprite
  52. - 3.4 - Re-Optimization
  53. - 3.5 - Added Last Human Insta-Kill
  54. - 3.6 - Re-Made Respawn System
  55. - 3.7 - Fixed Messages
  56. - 3.8 - Fixed CZ Bot Problem
  57. - 3.9 - Fixed Attacker == Victim Problem
  58. - 4.0 - Re-Optimization
  59. - 4.1 - Added Human Level
  60. - 4.2 - Recoil Gets Lower Per Level
  61. - 4.3 - Added Evolution
  62. - 4.4 - ZB HP Gets Higher Per Level
  63. - 4.5 - ZB Armor Gets Higher Per Level
  64. - 4.6 - Added Effects
  65. - 4.7 - Fixed HUD Message
  66. - 4.8 - Changed Code Arrangement
  67. - 4.9 - HUD Bug Fixed
  68. - 5.0 - Re-Optimization
  69. - 5.1 - Added Natives
  70. - 5.2 - Change Funcs
  71. - 5.3 - Re-Optimization
  72. - 5.4 - Added Fowards
  73. - 5.5 - Re-Optimization
  74.  
  75.  
  76. Coming Updates:
  77.  
  78. - Supply Box Drop
  79. - Speed Run Extra Item
  80. - x1.5 Ammo Extra Item
  81. - Hammer Extra Item
  82. - x30% Damage Recoil Level Extra Item
  83. - x5 Damage To Zombies Extra Item
  84. - Zombie Regeneration
  85. - Something Else Thats Cool
  86.  
  87. *-------------------------------------------------------------------------------------------------*/
  88.  
  89. /*------------------------------------------------------------------------------------------*
  90.  [ ZP CSO Plugin Includes ]
  91. *------------------------------------------------------------------------------------------*/
  92.  
  93. #include <amxmodx>
  94. #include <amxmisc>
  95. #include <fakemeta>
  96. #include <hamsandwich>
  97. #include <nvault>
  98. #include <fun>
  99. #include <xs>
  100. #include <zombieplague>
  101.  
  102. /*------------------------------------------------------------------------------------------*
  103.  [ ZP CSO Plugin Information ]
  104. *------------------------------------------------------------------------------------------*/
  105.  
  106. /*---------------------------------------------*
  107.  [ ZP CSO Plugin Name ]
  108. *---------------------------------------------*/
  109.  
  110. new const ZP_CSO_PLUGIN_NAME[] = "[ZP] CSO In-Game Theme"
  111.  
  112. /*---------------------------------------------*
  113.  [ ZP CSO Plugin Version ]
  114. *---------------------------------------------*/
  115.  
  116. new const ZP_CSO_PLUGIN_VERSION[] = "5.5"
  117.  
  118. /*---------------------------------------------*
  119.  [ ZP CSO Plugin Author ]
  120. *---------------------------------------------*/
  121.  
  122. new const ZP_CSO_PLUGIN_AUTHOR[] = "jc980"
  123.  
  124. /*---------------------------------------------*
  125.  [ ZP CSO Plugin CFG File ]
  126. *---------------------------------------------*/
  127.  
  128. new const ZP_CSO_PLUGIN_CFGFILE[] = "zp_cso_theme.cfg"
  129.  
  130. /*---------------------------------------------*
  131.  [ ZP CSO Plugin INC File ]
  132. *---------------------------------------------*/
  133.  
  134. new const ZP_CSO_PLUGIN_INCFILE[] = "zp_cso_theme"
  135.  
  136. /*---------------------------------------------*
  137.  [ ZP CSO Plugin LANG File ]
  138. *---------------------------------------------*/
  139.  
  140. new const ZP_CSO_PLUGIN_LANGFILE[] = "zp_cso_theme.txt"
  141.  
  142. /*------------------------------------------------------------------------------------------*
  143.  [ ZP CSO Plugin Game Variables ]
  144. *------------------------------------------------------------------------------------------*/
  145.  
  146. /*---------------------------------------------*
  147.  [ ZP CSO Plugin Variables Needed ]
  148. *---------------------------------------------*/
  149.  
  150. new zp_cso_sec, zp_cso_round, zp_cso_czbot, zp_cso_humanswins, zp_cso_zombieswins, zp_cso_roundstarted,
  151. zp_cso_evohp_forward, zp_cso_evo_armor_forward, zp_cso_forward_dummyresult
  152.  
  153. /*---------------------------------------------*
  154.  [ ZP CSO Plugin Points System ]
  155. *---------------------------------------------*/
  156.  
  157. new zp_cso_authid[33][35], zp_cso_vault, zp_cso_points[33], zp_cso_point_multiplier[33]
  158.  
  159. /*---------------------------------------------*
  160.  [ ZP CSO Plugin HUD ]
  161. *---------------------------------------------*/
  162.  
  163. new zp_center_textmsg, zp_cso_hud_sync1, zp_cso_hud_sync2, zp_cso_hud_sync3
  164.  
  165. /*---------------------------------------------*
  166.  [ ZP CSO Plugin HM & ZB Level Up System ]
  167. *---------------------------------------------*/
  168.  
  169. new zp_cso_hmlvl, zp_cso_lvlmax, zp_cso_zblvl[33], zp_cso_evomax, zp_cso_evokill[33], zp_cso_evokillmax,
  170. zp_cso_wpnnames[32], Float: zp_cso_clpushangle[33][3]
  171.  
  172. /*---------------------------------------------*
  173.  [ ZP CSO Plugin KILL! System ]
  174. *---------------------------------------------*/
  175.  
  176. new zp_cso_kill_lvl[33], zp_cso_kill_total[33], zp_cso_kill_time[33], zp_cso_kill_time_end, zp_cso_maxkills
  177.  
  178. /*---------------------------------------------*
  179.  [ ZP CSO Plugin Respawn System ]
  180. *---------------------------------------------*/
  181.  
  182. new zp_cso_total_spawn = 0, bool:zp_cso_first_spawn[33], Float: zp_cso_spawn_vec[60][3],
  183. Float: zp_cso_spawn_angle[60][3], Float: zp_cso_spawn_v_angle[60][3], zp_cso_respawnspr,
  184. zp_cso_respawnwait[33], zp_cso_lvlspr
  185.  
  186. /*------------------------------------------------------------------------------------------*
  187.  [ ZP CSO Plugin CVARs ]
  188. *------------------------------------------------------------------------------------------*/
  189.  
  190. new zp_cso_cvar_savetype, zp_cso_cvar_enablerespawn, zp_cso_cvar_delayrespawn
  191.  
  192. /*------------------------------------------------------------------------------------------*
  193.  [ ZP CSO Plugin Sounds ]
  194. *------------------------------------------------------------------------------------------*/
  195.  
  196. /*---------------------------------------------*
  197.  [ ZP CSO Plugin Round Start MP3 ]
  198. *---------------------------------------------*/
  199.  
  200. new const zp_cso_roundstart[][] =
  201. {
  202. "sound/zombie_plague/cso/zombi_start.mp3"
  203. }
  204.  
  205. /*---------------------------------------------*
  206.  [ ZP CSO Plugin Zombie Ambience ]
  207. *---------------------------------------------*/
  208.  
  209. new const zp_cso_roundambience[][] =
  210. {
  211. "sound/zombie_plague/cso/zombi_ambience.mp3"
  212. }
  213.  
  214. /*---------------------------------------------*
  215.  [ ZP CSO Plugin Infection Chant ]
  216. *---------------------------------------------*/
  217.  
  218. new const zp_cso_infectchant[][] =
  219. {
  220. "zombie_plague/cso/zombi_coming_1.wav"
  221. }
  222.  
  223. /*---------------------------------------------*
  224.  [ ZP CSO Plugin 20 Second(s) Warning ]
  225. *---------------------------------------------*/
  226.  
  227. new const zp_cso_warning[][] =
  228. {
  229. "zombie_plague/cso/20secs.wav"
  230. }
  231.  
  232. /*---------------------------------------------*
  233.  [ ZP CSO Plugin Come Back Chant ]
  234. *---------------------------------------------*/
  235.  
  236. new const zp_cso_zombierespawn[][] =
  237. {
  238. "zombie_plague/cso/zombi_comeback.wav"
  239. }
  240.  
  241. /*---------------------------------------------*
  242.  [ ZP CSO Plugin Human Level Up ]
  243. *---------------------------------------------*/
  244.  
  245. new const zp_cso_human_lvlup[][] =
  246. {
  247. "zombie_plague/cso/human_dmglvlup.wav"
  248. }
  249.  
  250. /*---------------------------------------------*
  251.  [ ZP CSO Plugin Zombie Level Up ]
  252. *---------------------------------------------*/
  253.  
  254. new const zp_cso_zombie_lvlup[][] =
  255. {
  256. "zombie_plague/cso/zombi_evolvlup.wav"
  257. }
  258.  
  259. /*---------------------------------------------*
  260.  [ ZP CSO Plugin Countdown Chant ]
  261. *---------------------------------------------*/
  262.  
  263. new zp_cso_countchant[10][] =
  264. {
  265. "zombie_plague/cso/1.wav",
  266. "zombie_plague/cso/2.wav",
  267. "zombie_plague/cso/3.wav",
  268. "zombie_plague/cso/4.wav",
  269. "zombie_plague/cso/5.wav",
  270. "zombie_plague/cso/6.wav",
  271. "zombie_plague/cso/7.wav",
  272. "zombie_plague/cso/8.wav",
  273. "zombie_plague/cso/9.wav",
  274. "zombie_plague/cso/10.wav"
  275. }
  276.  
  277. /*---------------------------------------------*
  278.  [ ZP CSO Plugin Normal KILL! Sounds ]
  279. *---------------------------------------------*/
  280.  
  281. new zp_cso_kill_sounds1[14][] =
  282. {
  283. "zombie_plague/cso/kill1.wav",
  284. "zombie_plague/cso/kill2.wav",
  285. "zombie_plague/cso/kill3.wav",
  286. "zombie_plague/cso/kill4.wav",
  287. "zombie_plague/cso/kill5.wav",
  288. "zombie_plague/cso/kill6.wav",
  289. "zombie_plague/cso/kill7.wav",
  290. "zombie_plague/cso/kill8.wav",
  291. "zombie_plague/cso/kill9.wav",
  292. "zombie_plague/cso/kill10.wav",
  293. "zombie_plague/cso/kill11.wav",
  294. "zombie_plague/cso/kill12.wav",
  295. "zombie_plague/cso/kill13.wav",
  296. "zombie_plague/cso/kill14.wav"
  297. }
  298.  
  299. /*---------------------------------------------*
  300.  [ ZP CSO Plugin Special KILL! Sounds ]
  301. *---------------------------------------------*/
  302.  
  303. new zp_cso_kill_sounds2[3][] =
  304. {
  305. "zombie_plague/cso/kill_knife.wav",
  306. "zombie_plague/cso/kill_grenade.wav",
  307. "zombie_plague/cso/kill_headshot.wav"
  308. }
  309.  
  310. /*------------------------------------------------------------------------------------------*
  311.  [ ZP CSO Plugin Kill System HUD ]
  312. *------------------------------------------------------------------------------------------*/
  313.  
  314. /*---------------------------------------------*
  315.  [ ZP CSO Plugin KILL! HUD Red ]
  316. *---------------------------------------------*/
  317.  
  318. new const zp_cso_kill_r[14] =
  319. {
  320. 250,
  321. 50,
  322. 250,
  323. 250,
  324. 250,
  325. 250,
  326. 250,
  327. 50,
  328. 250,
  329. 250,
  330. 250,
  331. 250,
  332. 250,
  333. 250
  334. }
  335.  
  336. /*---------------------------------------------*
  337.  [ ZP CSO Plugin KILL! HUD Green ]
  338. *---------------------------------------------*/
  339.  
  340. new const zp_cso_kill_g[14] =
  341. {
  342. 250,
  343. 150,
  344. 250,
  345. 150,
  346. 0,
  347. 250,
  348. 50,
  349. 150,
  350. 150,
  351. 0,
  352. 150,
  353. 250,
  354. 150,
  355. 0
  356. }
  357.  
  358. /*---------------------------------------------*
  359.  [ ZP CSO Plugin KILL! HUD Blue ]
  360. *---------------------------------------------*/
  361.  
  362. new const zp_cso_kill_b[14] =
  363. {
  364. 250,
  365. 250,
  366. 50,
  367. 50,
  368. 0,
  369. 50,
  370. 250,
  371. 250,
  372. 50,
  373. 0,
  374. 250,
  375. 50,
  376. 50,
  377. 0
  378. }
  379.  
  380. /*------------------------------------------------------------------------------------------*
  381.  [ ZP CSO Plugin HM & ZB Level Up System ]
  382. *------------------------------------------------------------------------------------------*/
  383.  
  384. /*---------------------------------------------*
  385.  [ ZP CSO Plugin Human Level Damage Multiplier ]
  386. *---------------------------------------------*/
  387.  
  388. new const zp_cso_dmg_lvl[11][] =
  389. {
  390. "1.0",
  391. "1.1",
  392. "1.2",
  393. "1.3",
  394. "1.4",
  395. "1.5",
  396. "1.6",
  397. "1.7",
  398. "1.8",
  399. "1.9",
  400. "2.0"
  401. }
  402.  
  403. /*---------------------------------------------*
  404.  [ ZP CSO Plugin Human Level Recoil Multiplier ]
  405. *---------------------------------------------*/
  406.  
  407. new const zp_cso_recoil_lvl[11][] =
  408. {
  409. "1.0",
  410. "0.9",
  411. "0.8",
  412. "0.7",
  413. "0.6",
  414. "0.5",
  415. "0.4",
  416. "0.3",
  417. "0.2",
  418. "0.1",
  419. "0.0"
  420. }
  421.  
  422. /*---------------------------------------------*
  423.  [ ZP CSO Plugin Zombie Level Additional HP ]
  424. *---------------------------------------------*/
  425.  
  426. new const zp_cso_evo_hp_lvl[4][] =
  427. {
  428. "0",
  429. "3000",
  430. "7000",
  431. "14000"
  432. }
  433.  
  434. /*---------------------------------------------*
  435.  [ ZP CSO Plugin Zombie Level Additional Armor ]
  436. *---------------------------------------------*/
  437.  
  438. new const zp_cso_evo_armor_lvl[4][] =
  439. {
  440. "0",
  441. "100",
  442. "500",
  443. "1000"
  444. }
  445.  
  446. /*------------------------------------------------------------------------------------------*
  447.  [ ZP CSO Plugin HM & ZB Level Up System HUD ]
  448. *------------------------------------------------------------------------------------------*/
  449.  
  450. /*---------------------------------------------*
  451.  [ ZP CSO Plugin Human Fire Power Percent ]
  452. *---------------------------------------------*/
  453.  
  454. new const zp_dmg_percent[11][] =
  455. {
  456. "100",
  457. "110",
  458. "120",
  459. "130",
  460. "140",
  461. "150",
  462. "160",
  463. "170",
  464. "180",
  465. "190",
  466. "200"
  467. }
  468.  
  469. /*---------------------------------------------*
  470.  [ ZP CSO Plugin Human Level HUD Red ]
  471. *---------------------------------------------*/
  472.  
  473. new const zp_cso_hmlvl_r[11] =
  474. {
  475. 0,
  476. 0,
  477. 0,
  478. 0,
  479. 255,
  480. 255,
  481. 255,
  482. 255,
  483. 255,
  484. 255,
  485. 255
  486. }
  487.  
  488. /*---------------------------------------------*
  489.  [ ZP CSO Plugin Human Level HUD Green ]
  490. *---------------------------------------------*/
  491.  
  492. new const zp_cso_hmlvl_g[11] =
  493. {
  494. 255,
  495. 255,
  496. 255,
  497. 255,
  498. 255,
  499. 255,
  500. 255,
  501. 155,
  502. 155,
  503. 155,
  504. 0
  505. }
  506.  
  507. /*---------------------------------------------*
  508.  [ ZP CSO Plugin Human Level HUD Blue ]
  509. *---------------------------------------------*/
  510.  
  511. new const zp_cso_hmlvl_b[11] =
  512. {
  513. 0,
  514. 0,
  515. 0,
  516. 0,
  517. 55,
  518. 55,
  519. 55,
  520. 55,
  521. 55,
  522. 55,
  523. 0
  524. }
  525.  
  526. /*---------------------------------------------*
  527.  [ ZP CSO Plugin Zombie Evolution Percent ]
  528. *---------------------------------------------*/
  529.  
  530. new const zp_evo_percent[4][] =
  531. {
  532. "100",
  533. "250",
  534. "350",
  535. "500"
  536. }
  537.  
  538. /*---------------------------------------------*
  539.  [ ZP CSO Plugin Zombie Level HUD Red ]
  540. *---------------------------------------------*/
  541.  
  542. new const zp_cso_zblvl_r[4] =
  543. {
  544. 255,
  545. 255,
  546. 255,
  547. 255
  548. }
  549.  
  550. /*---------------------------------------------*
  551.  [ ZP CSO Plugin Zombie Level HUD Green ]
  552. *---------------------------------------------*/
  553.  
  554. new const zp_cso_zblvl_g[4] =
  555. {
  556. 255,
  557. 255,
  558. 155,
  559. 0
  560. }
  561.  
  562. /*---------------------------------------------*
  563.  [ ZP CSO Plugin Zombie Level HUD Blue ]
  564. *---------------------------------------------*/
  565.  
  566. new const zp_cso_zblvl_b[4] =
  567. {
  568. 55,
  569. 55,
  570. 55,
  571. 0
  572. }
  573.  
  574. /*------------------------------------------------------------------------------------------*
  575.  [ ZP CSO Plugin Constants ]
  576. *------------------------------------------------------------------------------------------*/
  577.  
  578. /*---------------------------------------------*
  579.  [ ZP CSO Plugin Non-Weapon Bitsum ]
  580. *---------------------------------------------*/
  581.  
  582. new const ZP_CSO_NONWPN_BITSUM = ((1<<2)|(1<<CSW_HEGRENADE)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_KNIFE)|(1<<CSW_C4))
  583.  
  584. /*---------------------------------------------*
  585.  [ ZP CSO Plugin Damage HE Grenade Bitsum ]
  586. *---------------------------------------------*/
  587.  
  588. new const ZP_CSO_DMGHEGRENADE_BITSUM = (1<<24)
  589.  
  590. /*------------------------------------------------------------------------------------------*
  591.  [ ZP CSO Plugin Sprites ]
  592. *------------------------------------------------------------------------------------------*/
  593.  
  594. /*---------------------------------------------*
  595.  [ ZP CSO Plugin Respawn Sprite ]
  596. *---------------------------------------------*/
  597.  
  598. new zp_cso_respawnsprite[][] =
  599. {
  600. "sprites/zombie_plague/cso/zp_zbrespawn.spr"
  601. }
  602.  
  603. /*---------------------------------------------*
  604.  [ ZP CSO Plugin Human Level Up Sprite ]
  605. *---------------------------------------------*/
  606.  
  607. new zp_cso_levelsprite[][] =
  608. {
  609. "sprites/zombie_plague/cso/zp_hmlvlup.spr"
  610. }
  611.  
  612. /*------------------------------------------------------------------------------------------*
  613.  [ ZP CSO Plugin Code ]
  614. *------------------------------------------------------------------------------------------*/
  615.  
  616. /*---------------------------------------------*
  617.  [ ZP CSO Plugin Natives ]
  618. *---------------------------------------------*/
  619.  
  620. public plugin_natives()
  621. {
  622. register_library(ZP_CSO_PLUGIN_INCFILE)
  623.  
  624. register_native("zp_cso_theme_evohp", "zp_cso_native_evohp", 1)
  625. register_native("zp_cso_theme_evo_armor", "zp_cso_native_evo_armor", 1)
  626. }
  627.  
  628. /*---------------------------------------------*
  629.  [ ZP CSO Plugin Init ]
  630. *---------------------------------------------*/
  631.  
  632. public plugin_init()
  633. {
  634. register_plugin(ZP_CSO_PLUGIN_NAME, ZP_CSO_PLUGIN_VERSION, ZP_CSO_PLUGIN_AUTHOR)
  635.  
  636. register_event("HLTV", "zp_cso_round_start", "a", "1=0", "2=0")
  637. register_event("DeathMsg", "zp_cso_death", "a", "1>0")
  638.  
  639. RegisterHam(Ham_TakeDamage, "player", "zp_cso_takedamage")
  640.  
  641. new iWpn
  642.  
  643. for(iWpn = 1; iWpn <= CSW_P90; iWpn++)
  644. {
  645. if( !(ZP_CSO_NONWPN_BITSUM & (1 << iWpn)) && get_weaponname(iWpn, zp_cso_wpnnames, charsmax(zp_cso_wpnnames)))
  646. {
  647. RegisterHam(Ham_Weapon_PrimaryAttack, zp_cso_wpnnames, "zp_cso_primary_attack")
  648. RegisterHam(Ham_Weapon_PrimaryAttack, zp_cso_wpnnames, "zp_cso_primary_attack_post",1)
  649. }
  650. }
  651.  
  652. zp_cso_cvar_savetype = register_cvar("zp_csotheme_savetype", "1")
  653. zp_cso_cvar_enablerespawn = register_cvar("zp_csotheme_enable_respawn", "1")
  654. zp_cso_cvar_delayrespawn = register_cvar("zp_csotheme_delay_respawn", "5.0")
  655.  
  656. zp_center_textmsg = get_user_msgid("TextMsg")
  657. zp_cso_vault = nvault_open("zp_cso_theme")
  658. zp_cso_hud_sync1 = CreateHudSyncObj()
  659. zp_cso_hud_sync2 = CreateHudSyncObj()
  660. zp_cso_hud_sync3 = CreateHudSyncObj()
  661.  
  662. zp_cso_evohp_forward = CreateMultiForward("zp_cso_theme_evohp_lvlup", ET_IGNORE, FP_CELL, FP_CELL)
  663. zp_cso_evo_armor_forward = CreateMultiForward("zp_cso_theme_evo_armor_lvlup", ET_IGNORE, FP_CELL, FP_CELL)
  664.  
  665. server_cmd("exec addons/amxmodx/configs/zp_cso_theme.cfg")
  666.  
  667. csdm_respawn()
  668. }
  669.  
  670. /*---------------------------------------------*
  671.  [ ZP CSO Plugin End ]
  672. *---------------------------------------------*/
  673.  
  674. public plugin_end()
  675. {
  676. nvault_close(zp_cso_vault)
  677. }
  678.  
  679. /*---------------------------------------------*
  680.  [ ZP CSO Plugin End ]
  681. *---------------------------------------------*/
  682.  
  683. public plugin_cfg()
  684. {
  685. new zp_configsdir[32]
  686.  
  687. get_configsdir(zp_configsdir, charsmax(zp_configsdir))
  688.  
  689. server_cmd("exec %s/%s", zp_configsdir, ZP_CSO_PLUGIN_CFGFILE)
  690. }
  691.  
  692. /*---------------------------------------------*
  693.  [ ZP CSO Plugin Precache ]
  694. *---------------------------------------------*/
  695.  
  696. public plugin_precache()
  697. {
  698. register_dictionary(ZP_CSO_PLUGIN_LANGFILE)
  699.  
  700. new i
  701.  
  702. for(i = 0; i < sizeof zp_cso_roundstart; i++)
  703. engfunc(EngFunc_PrecacheGeneric, zp_cso_roundstart[i])
  704.  
  705. for(i = 0; i < sizeof zp_cso_roundambience; i++)
  706. engfunc(EngFunc_PrecacheGeneric, zp_cso_roundambience[i])
  707.  
  708. for(i = 0; i < sizeof zp_cso_infectchant; i++)
  709. engfunc(EngFunc_PrecacheSound, zp_cso_infectchant[i])
  710.  
  711. for(i = 0; i < sizeof zp_cso_warning; i++)
  712. engfunc(EngFunc_PrecacheSound, zp_cso_warning[i])
  713.  
  714. for(i = 0; i < sizeof zp_cso_countchant; i++)
  715. engfunc(EngFunc_PrecacheSound, zp_cso_countchant[i])
  716.  
  717. for(i = 0; i < sizeof zp_cso_kill_sounds1; i++)
  718. engfunc(EngFunc_PrecacheSound, zp_cso_kill_sounds1[i])
  719.  
  720. for(i = 0; i < sizeof zp_cso_kill_sounds2; i++)
  721. engfunc(EngFunc_PrecacheSound, zp_cso_kill_sounds2[i])
  722.  
  723. for(i = 0; i < sizeof zp_cso_zombierespawn; i++)
  724. engfunc(EngFunc_PrecacheSound, zp_cso_zombierespawn[i])
  725.  
  726. for(i = 0; i < sizeof zp_cso_human_lvlup; i++)
  727. engfunc(EngFunc_PrecacheSound, zp_cso_human_lvlup[i])
  728.  
  729. for(i = 0; i < sizeof zp_cso_zombie_lvlup; i++)
  730. engfunc(EngFunc_PrecacheSound, zp_cso_zombie_lvlup[i])
  731.  
  732. for(i = 0; i < sizeof zp_cso_respawnsprite; i++)
  733. zp_cso_respawnspr = engfunc(EngFunc_PrecacheModel, zp_cso_respawnsprite[i])
  734.  
  735. for(i = 0; i < sizeof zp_cso_levelsprite; i++)
  736. zp_cso_lvlspr = engfunc(EngFunc_PrecacheModel, zp_cso_levelsprite[i])
  737. }
  738.  
  739. /*---------------------------------------------*
  740.  [ ZP CSO Plugin Round Start ( CS ) ]
  741. *---------------------------------------------*/
  742.  
  743. public zp_cso_round_start()
  744. {
  745. new iSound, iMP3, MP3[64], iSpeak[64], iPlayers[32], iPlayer, iPlayerNum
  746.  
  747. iSound = random_num(0, charsmax(zp_cso_warning))
  748. iMP3 = random_num(0, charsmax(zp_cso_roundstart))
  749. copy(MP3, charsmax(MP3), zp_cso_roundstart[iMP3])
  750. copy(iSpeak, charsmax(iSpeak), zp_cso_warning[iSound])
  751.  
  752. client_cmd(0,"speak ^"%s^"", iSpeak)
  753. client_cmd(0,"mp3 play ^"%s^"", MP3)
  754.  
  755. get_players(iPlayers, iPlayerNum)
  756.  
  757. for(new iNum; iNum < iPlayerNum; iNum++)
  758. {
  759. iPlayer = iPlayers[iNum]
  760.  
  761. zp_cso_zblvl[iPlayer] = 0
  762. zp_cso_evokill[iPlayer] = 0
  763.  
  764. zp_cso_damage_plus(iPlayer, 0)
  765.  
  766. if(zp_get_user_zombie(iPlayer))
  767. {
  768. zp_cso_evolution(iPlayer, 0)
  769. }
  770. }
  771.  
  772. zp_cso_evokillmax = 2
  773. zp_cso_evomax = 3
  774. zp_cso_hmlvl = 0
  775. zp_cso_lvlmax = 10
  776. zp_cso_round += 1
  777. zp_cso_kill_time_end = 10
  778. zp_cso_maxkills = 14
  779. zp_cso_sec = 20
  780.  
  781. set_task(20.0,"zp_cso_ambience")
  782. zp_cso_countdown()
  783. }
  784.  
  785. /*---------------------------------------------*
  786.  [ ZP CSO Plugin CSDM Respawn Method ]
  787. *---------------------------------------------*/
  788.  
  789. csdm_respawn()
  790. {
  791. new zp_map[32], zp_config[32], zp_mapfile[64]
  792.  
  793. get_mapname(zp_map, 31)
  794. get_configsdir(zp_config, 31)
  795.  
  796. format(zp_mapfile, 63, "%s\csdm\%s.spawns.cfg", zp_config, zp_map)
  797.  
  798. zp_cso_total_spawn = 0
  799.  
  800. if (file_exists(zp_mapfile))
  801. {
  802. new zp_new_data[124], zp_len
  803. new zp_line = 0
  804. new zp_pos[12][8]
  805.  
  806. while(zp_cso_total_spawn < 60 && (zp_line = read_file(zp_mapfile , zp_line, zp_new_data, 123, zp_len)) != 0)
  807. {
  808. if (strlen(zp_new_data) < 2 || zp_new_data[0] == '[')
  809. continue
  810.  
  811. parse(zp_new_data, zp_pos[1], 7, zp_pos[2], 7, zp_pos[3], 7, zp_pos[4], 7, zp_pos[5], 7, zp_pos[6], 7, zp_pos[7], 7, zp_pos[8], 7, zp_pos[9], 7, zp_pos[10], 7)
  812.  
  813. zp_cso_spawn_vec[zp_cso_total_spawn][0] = str_to_float(zp_pos[1])
  814. zp_cso_spawn_vec[zp_cso_total_spawn][1] = str_to_float(zp_pos[2])
  815. zp_cso_spawn_vec[zp_cso_total_spawn][2] = str_to_float(zp_pos[3])
  816.  
  817. zp_cso_spawn_angle[zp_cso_total_spawn][0] = str_to_float(zp_pos[4])
  818. zp_cso_spawn_angle[zp_cso_total_spawn][1] = str_to_float(zp_pos[5])
  819. zp_cso_spawn_angle[zp_cso_total_spawn][2] = str_to_float(zp_pos[6])
  820.  
  821. zp_cso_spawn_v_angle[zp_cso_total_spawn][0] = str_to_float(zp_pos[8])
  822. zp_cso_spawn_v_angle[zp_cso_total_spawn][1] = str_to_float(zp_pos[9])
  823. zp_cso_spawn_v_angle[zp_cso_total_spawn][2] = str_to_float(zp_pos[10])
  824.  
  825. zp_cso_total_spawn += 1
  826. }
  827.  
  828. if (zp_cso_total_spawn >= 2 && get_pcvar_num(zp_cso_cvar_enablerespawn) == 1)
  829. {
  830. RegisterHam(Ham_Spawn, "player", "zp_cso_zombie_spawn", 1)
  831. }
  832. }
  833.  
  834. return 1
  835. }
  836.  
  837. /*---------------------------------------------*
  838.  [ ZP CSO Plugin CVARs Zombie Spawn Location ]
  839. *---------------------------------------------*/
  840.  
  841. public zp_cso_zombie_spawn(id)
  842. {
  843. if (!is_user_alive(id) || !zp_get_user_zombie(id))
  844. return PLUGIN_CONTINUE
  845.  
  846. if (zp_cso_first_spawn[id])
  847. {
  848. zp_cso_first_spawn[id] = false
  849.  
  850. return PLUGIN_CONTINUE
  851. }
  852.  
  853. new zp_list[60]
  854. new zp_num = 0
  855. new zp_final = -1
  856. new zp_total = 0
  857. new zp_players[32], zp_no, zp_xo = 0
  858. new Float:zp_location[32][3], zp_locnum
  859.  
  860. get_players(zp_players,zp_num)
  861.  
  862. for (new i=0; i < zp_num; i++)
  863. {
  864. if (is_user_alive(zp_players[i]) && zp_players[i] != id)
  865. {
  866. pev(zp_players[i], pev_origin, zp_location[zp_locnum])
  867. zp_locnum++
  868. }
  869. }
  870.  
  871. zp_num = 0
  872.  
  873. while (zp_num <= zp_cso_total_spawn)
  874. {
  875. if (zp_num == zp_cso_total_spawn)
  876. break
  877.  
  878. zp_no = random_num(0, zp_cso_total_spawn - 1)
  879.  
  880. if (!zp_list[zp_no])
  881. {
  882. zp_list[zp_no] = 1
  883. zp_num += 1
  884. }
  885. else
  886. {
  887. zp_total += 1
  888. if (zp_total > 100)
  889. break
  890.  
  891. continue
  892. }
  893.  
  894. if (zp_locnum < 1)
  895. {
  896. zp_final = zp_no
  897. break
  898. }
  899.  
  900. zp_final = zp_no
  901.  
  902. for (zp_xo = 0; zp_xo < zp_locnum; zp_xo++)
  903. {
  904. new Float: zp_distance = get_distance_f(zp_cso_spawn_vec[zp_no], zp_location[zp_xo])
  905.  
  906. if (zp_distance < 250.0)
  907. {
  908. zp_final = -1
  909. break
  910. }
  911. }
  912.  
  913. if (zp_final != -1)
  914. break
  915. }
  916.  
  917. if (zp_final != -1)
  918. {
  919. new Float:mins[3], Float:maxs[3]
  920.  
  921. pev(id, pev_mins, mins)
  922. pev(id, pev_maxs, maxs)
  923.  
  924. engfunc(EngFunc_SetSize, id, mins, maxs)
  925. engfunc(EngFunc_SetOrigin, id, zp_cso_spawn_vec[zp_final])
  926.  
  927. set_pev(id, pev_fixangle, 1)
  928. set_pev(id, pev_angles, zp_cso_spawn_angle[zp_final])
  929. set_pev(id, pev_v_angle, zp_cso_spawn_v_angle[zp_final])
  930. set_pev(id, pev_fixangle, 1)
  931. }
  932.  
  933. return PLUGIN_CONTINUE
  934. }
  935.  
  936. /*---------------------------------------------*
  937.  [ ZP CSO Plugin Death Event ]
  938. *---------------------------------------------*/
  939.  
  940. public zp_cso_death()
  941. {
  942. new iKiller = read_data(1)
  943. new iVictim = read_data(2)
  944. new iHeadshot = read_data(3)
  945. new iClip, iAmmo, iWeapon = get_user_weapon(iKiller, iClip, iAmmo)
  946. new iReward = 100
  947. new iKills[32], iType[32], Float: iDelay
  948. new iDmglvl, iHumans[32], iHuman, iHumanNum
  949.  
  950. zp_cso_kill_lvl[iVictim] = 0
  951. zp_cso_kill_time[iVictim] = 0
  952. zp_cso_kill_time[iKiller] = 0
  953. zp_cso_kill_total[iKiller] += 1
  954.  
  955. if(!zp_get_user_zombie(iKiller))
  956. {
  957. if(zp_cso_hmlvl < zp_cso_lvlmax)
  958. {
  959. zp_cso_hmlvl += 1
  960. iDmglvl = zp_cso_hmlvl
  961.  
  962. get_players(iHumans, iHumanNum)
  963.  
  964. for(new iNum ; iNum < iHumanNum; iNum++)
  965. {
  966. iHuman = iHumans[iNum]
  967.  
  968. zp_cso_damage_plus(iHuman, iDmglvl)
  969. }
  970. }
  971. }
  972.  
  973. if(iKiller == iVictim)
  974. return PLUGIN_CONTINUE
  975.  
  976. if(zp_get_user_zombie(iVictim))
  977. {
  978. zp_cso_kill_lvl[iVictim] = 0
  979. zp_cso_kill_time[iVictim] = 0
  980.  
  981. if(!iHeadshot)
  982. {
  983. iDelay = get_pcvar_float(zp_cso_cvar_delayrespawn)
  984. set_task(iDelay,"zp_cso_zombie_respawner", iVictim)
  985.  
  986. zp_cso_respawnwait[iVictim] = get_pcvar_num(zp_cso_cvar_delayrespawn)
  987.  
  988. zp_zbrespawn(iVictim)
  989. zp_zbrespawn_msg(iVictim)
  990. }
  991. else
  992. {
  993. zp_zbrespawn_msg2(iVictim)
  994. }
  995. }
  996.  
  997. if(zp_cso_kill_lvl[iKiller] < zp_cso_maxkills)
  998. {
  999. zp_cso_kill_lvl[iKiller] += 1
  1000. iKills[iKiller] = zp_cso_kill_lvl[iKiller]
  1001. zp_cso_point_multiplier[iKiller] = iKills[iKiller]
  1002.  
  1003. if(zp_get_user_zombie(iKiller))
  1004. {
  1005. if(iHeadshot)
  1006. {
  1007. iType[iKiller] = 3
  1008. }
  1009. else
  1010. {
  1011. iType[iKiller] = 0
  1012. }
  1013. }
  1014. else if(iWeapon == CSW_KNIFE)
  1015. {
  1016. iType[iKiller] = 1
  1017. }
  1018. else if(iWeapon == CSW_HEGRENADE)
  1019. {
  1020. iType[iKiller] = 2
  1021. }
  1022. else if(iHeadshot)
  1023. {
  1024. iType[iKiller] = 3
  1025. }
  1026. else
  1027. {
  1028. iType[iKiller] = 0
  1029. }
  1030.  
  1031. zp_cso_announce_kill(iKiller, iKills[iKiller], iType[iKiller])
  1032. }
  1033.  
  1034. zp_cso_points[iKiller] += iReward * zp_cso_point_multiplier[iKiller]
  1035.  
  1036. if(zp_cso_kill_lvl[iKiller] == zp_cso_maxkills)
  1037. {
  1038. zp_cso_kill_lvl[iKiller] = 0
  1039. }
  1040.  
  1041. return PLUGIN_CONTINUE
  1042. }
  1043.  
  1044. /*---------------------------------------------*
  1045.  [ ZP CSO Plugin Take Damage Event ]
  1046. *---------------------------------------------*/
  1047.  
  1048. public zp_cso_takedamage(iVictim, iInflictor, iAttacker, Float: iDamage, iDamage_Type)
  1049. {
  1050. if(iAttacker == iVictim)
  1051. return HAM_IGNORED
  1052.  
  1053. if(zp_get_user_zombie(iAttacker) && zp_get_user_last_human(iVictim))
  1054. {
  1055. SetHamParamFloat(4, float(get_user_health(iVictim) * 5 ))
  1056.  
  1057. return HAM_IGNORED
  1058. }
  1059.  
  1060. if (!zp_get_user_zombie(iAttacker) && zp_get_user_zombie(iVictim))
  1061. {
  1062. if ((iDamage_Type & ZP_CSO_DMGHEGRENADE_BITSUM) && !zp_get_user_zombie(iAttacker))
  1063. {
  1064. new Float: zp_hedmg = 500.0 * zp_cso_hmlvl
  1065. iDamage = zp_hedmg
  1066. }
  1067.  
  1068. else if (zp_cso_hmlvl)
  1069. {
  1070. new Float: zp_dmg_lvl = str_to_float(zp_cso_dmg_lvl[zp_cso_hmlvl])
  1071. iDamage *= zp_dmg_lvl
  1072. }
  1073.  
  1074. SetHamParamFloat(4, iDamage)
  1075. return HAM_IGNORED
  1076. }
  1077.  
  1078. return HAM_IGNORED
  1079. }
  1080.  
  1081. /*---------------------------------------------*
  1082.  [ ZP CSO Plugin Primary Attack Event ]
  1083. *---------------------------------------------*/
  1084.  
  1085. public zp_cso_primary_attack(ent)
  1086. {
  1087. new iPlayer = pev(ent,pev_owner)
  1088.  
  1089. pev(iPlayer, pev_punchangle, zp_cso_clpushangle[iPlayer])
  1090.  
  1091. return HAM_IGNORED
  1092. }
  1093.  
  1094. /*---------------------------------------------*
  1095.  [ ZP CSO Plugin CVARs Primary Attack Post ]
  1096. *---------------------------------------------*/
  1097.  
  1098. public zp_cso_primary_attack_post(ent)
  1099. {
  1100. new iPlayer = pev(ent, pev_owner)
  1101.  
  1102. if (!zp_get_user_zombie(iPlayer))
  1103. {
  1104. new Float: zp_recoil_lvl = str_to_float(zp_cso_recoil_lvl[zp_cso_hmlvl])
  1105. new Float: zp_push[3]
  1106.  
  1107. pev(iPlayer, pev_punchangle, zp_push)
  1108.  
  1109. xs_vec_sub(zp_push, zp_cso_clpushangle[iPlayer], zp_push)
  1110.  
  1111. xs_vec_mul_scalar(zp_push, zp_recoil_lvl, zp_push)
  1112.  
  1113. xs_vec_add(zp_push, zp_cso_clpushangle[iPlayer], zp_push)
  1114.  
  1115. set_pev(iPlayer, pev_punchangle, zp_push)
  1116. }
  1117.  
  1118. return HAM_IGNORED
  1119. }
  1120.  
  1121. /*---------------------------------------------*
  1122.  [ ZP CSO Plugin Round Start ( ZP ) ]
  1123. *---------------------------------------------*/
  1124.  
  1125. public zp_round_started()
  1126. {
  1127. zp_cso_roundstarted = 1
  1128.  
  1129. new iSound, iText[64], iSpeak[64]
  1130.  
  1131. iSound = random_num(0,charsmax(zp_cso_infectchant))
  1132.  
  1133. copy(iSpeak, charsmax(iSpeak),zp_cso_infectchant[iSound])
  1134. client_cmd(0,"speak ^"%s^"", iSpeak)
  1135.  
  1136. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_INFECTION_NOTICE")
  1137. zp_clientcenter_text(0, iText)
  1138. }
  1139.  
  1140. /*---------------------------------------------*
  1141.  [ ZP CSO Plugin Round End ( ZP ) ]
  1142. *---------------------------------------------*/
  1143.  
  1144. public zp_round_ended()
  1145. {
  1146. if(zp_get_human_count() == 0)
  1147. {
  1148. zp_cso_zombieswins += 1
  1149. }
  1150. else
  1151. {
  1152. zp_cso_humanswins += 1
  1153. }
  1154.  
  1155. zp_cso_roundstarted = 0
  1156. }
  1157.  
  1158. /*---------------------------------------------*
  1159.  [ ZP CSO Plugin User Infected Post ]
  1160. *---------------------------------------------*/
  1161.  
  1162. public zp_user_infected_post(iPlayer, iInfector, iNemesis)
  1163. {
  1164. if ( !iInfector || iNemesis)
  1165. return PLUGIN_CONTINUE
  1166.  
  1167. new iSound, iText[64], iKills[32], iType[32], iSpeak[64], iEvolvl[32]
  1168. new iReward = 100
  1169.  
  1170. zp_cso_kill_time[iInfector] = 0
  1171. zp_cso_kill_total[iInfector] += 1
  1172. zp_cso_evokill[iInfector] += 1
  1173.  
  1174. iSound = random_num(0,charsmax(zp_cso_infectchant))
  1175.  
  1176. copy(iSpeak, charsmax(iSpeak),zp_cso_infectchant[iSound])
  1177. client_cmd(0,"speak ^"%s^"", iSpeak)
  1178.  
  1179. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_INFECTED_NOTICE")
  1180. zp_clientcenter_text(0, iText)
  1181.  
  1182. if(zp_cso_zblvl[iInfector] < zp_cso_evomax)
  1183. {
  1184. if(zp_cso_evokill[iInfector] == zp_cso_evokillmax)
  1185. {
  1186. zp_cso_zblvl[iInfector] += 1
  1187. iEvolvl[iInfector] = zp_cso_zblvl[iInfector]
  1188. zp_cso_evokill[iInfector] = 0
  1189.  
  1190. zp_cso_evolution(iInfector, iEvolvl[iInfector])
  1191.  
  1192. iSound = random_num(0, charsmax(zp_cso_zombie_lvlup))
  1193. copy(iSpeak, charsmax(iSpeak), zp_cso_zombie_lvlup[iSound])
  1194. client_cmd(iInfector,"speak ^"%s^"", iSpeak)
  1195.  
  1196. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_EVO_LVLUP_NOTICE", iEvolvl[iInfector])
  1197. zp_clientcenter_text(iInfector, iText)
  1198. }
  1199. }
  1200.  
  1201. if(zp_cso_kill_lvl[iInfector] < zp_cso_maxkills)
  1202. {
  1203. zp_cso_kill_lvl[iInfector] += 1
  1204. iKills[iInfector] = zp_cso_kill_lvl[iInfector]
  1205. zp_cso_point_multiplier[iInfector] = iKills[iInfector]
  1206. iType[iInfector] = 0
  1207.  
  1208. zp_cso_announce_kill(iInfector, iKills[iInfector], iType[iInfector])
  1209. }
  1210.  
  1211. zp_cso_points[iInfector] += iReward * zp_cso_point_multiplier[iInfector]
  1212.  
  1213. if(zp_cso_kill_lvl[iInfector] == zp_cso_maxkills)
  1214. {
  1215. zp_cso_kill_lvl[iInfector] = 0
  1216. }
  1217.  
  1218. return PLUGIN_CONTINUE
  1219. }
  1220.  
  1221. /*---------------------------------------------*
  1222.  [ ZP CSO Plugin Client Authorization Forward ]
  1223. *---------------------------------------------*/
  1224.  
  1225. public client_authorized(id)
  1226. {
  1227. if(get_pcvar_num(zp_cso_cvar_savetype) == 0)
  1228. {
  1229. get_user_ip( id, zp_cso_authid[id], charsmax( zp_cso_authid[]))
  1230. }
  1231. if(get_pcvar_num(zp_cso_cvar_savetype) == 1)
  1232. {
  1233. get_user_name( id, zp_cso_authid[id], charsmax( zp_cso_authid[]))
  1234. }
  1235. if(get_pcvar_num(zp_cso_cvar_savetype) == 2)
  1236. {
  1237. get_user_authid( id, zp_cso_authid[id], charsmax( zp_cso_authid[]))
  1238. }
  1239. }
  1240.  
  1241. /*---------------------------------------------*
  1242.  [ ZP CSO Plugin Client Put In Server Forward ]
  1243. *---------------------------------------------*/
  1244.  
  1245. public client_putinserver(id)
  1246. {
  1247. zp_cso_auto_on(id)
  1248. }
  1249.  
  1250. /*---------------------------------------------*
  1251.  [ ZP CSO Plugin Client Connected Forward ]
  1252. *---------------------------------------------*/
  1253.  
  1254. public client_connect(id)
  1255. {
  1256. zp_cso_points[id] = 0
  1257. zp_cso_kill_total[id] = 0
  1258.  
  1259. zp_cso_load(id)
  1260. }
  1261.  
  1262. /*---------------------------------------------*
  1263.  [ ZP CSO Plugin Client Disconnected Forward ]
  1264. *---------------------------------------------*/
  1265.  
  1266. public client_disconnect(id)
  1267. {
  1268. zp_cso_save(id)
  1269.  
  1270. zp_cso_points[id] = 0
  1271. zp_cso_kill_total[id] = 0
  1272. }
  1273.  
  1274. /*------------------------------------------------------------------------------------------*
  1275.  [ ZP CSO Plugin Public Functions ]
  1276. *------------------------------------------------------------------------------------------*/
  1277.  
  1278. /*---------------------------------------------*
  1279.  [ ZP CSO Plugin Public Functions: Zombie Respawn Effect ]
  1280. *---------------------------------------------*/
  1281.  
  1282. public zp_zbrespawn(iVictim)
  1283. {
  1284. if (zp_cso_roundstarted == 0 || !is_user_connected(iVictim) || is_user_alive(iVictim))
  1285. return PLUGIN_CONTINUE
  1286.  
  1287. zp_effect_respawn(iVictim)
  1288. set_task(2.0, "zp_zbrespawn", iVictim)
  1289.  
  1290. return PLUGIN_CONTINUE
  1291. }
  1292.  
  1293. /*---------------------------------------------*
  1294.  [ ZP CSO Plugin Public Functions: Zombie Respawn Message ]
  1295. *---------------------------------------------*/
  1296.  
  1297. public zp_zbrespawn_msg(iVictim)
  1298. {
  1299. if (zp_cso_roundstarted == 0 || !is_user_connected(iVictim))
  1300. return PLUGIN_CONTINUE
  1301.  
  1302. new iText[64]
  1303.  
  1304. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_ZOMBIERESPAWN_MSG", zp_cso_respawnwait[iVictim])
  1305. zp_clientcenter_text(iVictim, iText)
  1306.  
  1307. zp_cso_respawnwait[iVictim] -= 1
  1308.  
  1309. if(zp_cso_respawnwait[iVictim] >= 1)
  1310. {
  1311. set_task(1.0, "zp_zbrespawn_msg", iVictim)
  1312. }
  1313.  
  1314. return PLUGIN_CONTINUE
  1315. }
  1316.  
  1317. /*---------------------------------------------*
  1318.  [ ZP CSO Plugin Public Functions: Zombie Respawner ]
  1319. *---------------------------------------------*/
  1320.  
  1321. public zp_cso_zombie_respawner(iVictim)
  1322. {
  1323. if(get_pcvar_num(zp_cso_cvar_enablerespawn) == 1)
  1324. {
  1325. new iSound, iSpeak[64]
  1326.  
  1327. ExecuteHamB(Ham_CS_RoundRespawn, iVictim)
  1328.  
  1329. iSound = random_num(0, charsmax(zp_cso_zombierespawn))
  1330. copy(iSpeak, charsmax(iSpeak), zp_cso_zombierespawn[iSound])
  1331. client_cmd(0, "speak ^"%s^"", iSpeak)
  1332.  
  1333. zp_infect_user(iVictim)
  1334. zp_cso_evolution(iVictim, zp_cso_zblvl[iVictim])
  1335. }
  1336. }
  1337.  
  1338. /*---------------------------------------------*
  1339.  [ ZP CSO Plugin Public Functions: Zombie Ambience ]
  1340. *---------------------------------------------*/
  1341.  
  1342. public zp_cso_ambience()
  1343. {
  1344. new iMP3, MP3[64]
  1345.  
  1346. iMP3 = random_num(0,charsmax(zp_cso_roundambience))
  1347. copy(MP3, charsmax(MP3), zp_cso_roundambience[iMP3])
  1348.  
  1349. client_cmd(0,"mp3 play ^"%s^"", MP3)
  1350. }
  1351.  
  1352. /*---------------------------------------------*
  1353.  [ ZP CSO Plugin Public Functions: Zombie Countdown ]
  1354. *---------------------------------------------*/
  1355.  
  1356. public zp_cso_countdown()
  1357. {
  1358. new iText[64]
  1359.  
  1360. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_COUNTDOWN_NOTICE", zp_cso_sec)
  1361. zp_clientcenter_text(0, iText)
  1362.  
  1363. zp_cso_sec -= 1
  1364.  
  1365. if(zp_cso_sec < 10)
  1366. {
  1367. zp_cso_chantdown()
  1368. }
  1369.  
  1370. if(zp_cso_sec >= 1)
  1371. {
  1372. set_task(1.0, "zp_cso_countdown")
  1373. }
  1374. }
  1375.  
  1376. /*---------------------------------------------*
  1377.  [ ZP CSO Plugin Public Functions: Auto On Tasks ]
  1378. *---------------------------------------------*/
  1379.  
  1380. public zp_cso_auto_on(id)
  1381. {
  1382. set_task(1.0,"zp_cso_hud_info", id, _, _, "b")
  1383. set_task(1.0,"zp_cso_hud_score", id, _, _, "b")
  1384. set_task(1.0,"zp_check_kill_time", id, _, _, "b")
  1385.  
  1386. if(!zp_cso_czbot)
  1387. {
  1388. set_task(0.1, "zp_cso_register_czbot", id)
  1389. }
  1390. }
  1391.  
  1392. /*---------------------------------------------*
  1393.  [ ZP CSO Plugin Public Functions: HUD Informer ]
  1394. *---------------------------------------------*/
  1395.  
  1396. public zp_cso_hud_info(id)
  1397. {
  1398. new iMsg[600], zp_username[32][31], zp_dmg_lvl, zp_evo_lvl[32], zp_r, zp_g, zp_b
  1399.  
  1400. zp_dmg_lvl = zp_cso_hmlvl
  1401. zp_evo_lvl[id] = zp_cso_zblvl[id]
  1402.  
  1403. if (!is_user_alive(id))
  1404. {
  1405. zp_r = 0
  1406. zp_g = 255
  1407. zp_b = 0
  1408. }
  1409. else if(zp_get_user_zombie(id))
  1410. {
  1411. zp_r = zp_cso_zblvl_r[zp_evo_lvl[id]]
  1412. zp_g = zp_cso_zblvl_g[zp_evo_lvl[id]]
  1413. zp_b = zp_cso_zblvl_b[zp_evo_lvl[id]]
  1414. }
  1415. else
  1416. {
  1417. zp_r = zp_cso_hmlvl_r[zp_dmg_lvl]
  1418. zp_g = zp_cso_hmlvl_g[zp_dmg_lvl]
  1419. zp_b = zp_cso_hmlvl_b[zp_dmg_lvl]
  1420. }
  1421.  
  1422. get_user_name(id, zp_username[id], charsmax(zp_username))
  1423.  
  1424. if (!is_user_alive(id))
  1425. {
  1426. set_hudmessage( zp_r, zp_g, zp_b, -0.02, -0.28, 0, 6.0, 1.1, 0.0, 0.0, -1)
  1427. format(iMsg, charsmax(iMsg), "[ %L ] - [ %L: %s ]^n^n[ %L: %i ]^n[ %L: %i ]", LANG_PLAYER, "ZP_CSO_TITLE", LANG_PLAYER, "ZP_CSO_STATS", zp_username[id], LANG_PLAYER, "ZP_CSO_KILLTOTAL", zp_cso_kill_total[id], LANG_PLAYER, "ZP_CSO_POINTTOTAL", zp_cso_points[id])
  1428. }
  1429. else if(zp_get_user_zombie(id))
  1430. {
  1431. set_hudmessage( zp_r, zp_g, zp_b, -0.02, -0.28, 0, 6.0, 1.1, 0.0, 0.0, -1)
  1432. format(iMsg, charsmax(iMsg), "[ %L ] - [ %L: %s ]^n^n[ %L: %i ]^n[ %L: %i ]^n^n[ %L: %i ]^n[ %L: %L ]", LANG_PLAYER, "ZP_CSO_TITLE", LANG_PLAYER, "ZP_CSO_STATS", zp_username[id], LANG_PLAYER, "ZP_CSO_KILLTOTAL", zp_cso_kill_total[id], LANG_PLAYER, "ZP_CSO_POINTTOTAL", zp_cso_points[id], LANG_PLAYER, "ZP_CSO_EVO_LVL", zp_evo_lvl[id], LANG_PLAYER, "ZP_CSO_EVOLUTION", LANG_PLAYER, "ZP_CSO_PERCENT", str_to_num(zp_evo_percent[zp_evo_lvl[id]]))
  1433. }
  1434. else
  1435. {
  1436. set_hudmessage( zp_r, zp_g, zp_b, -0.02, -0.28, 0, 6.0, 1.1, 0.0, 0.0, -1)
  1437. format(iMsg, charsmax(iMsg), "[ %L ] - [ %L: %s ]^n^n[ %L: %i ]^n[ %L: %i ]^n^n[ %L: %i ]^n[ %L: %L ]", LANG_PLAYER, "ZP_CSO_TITLE", LANG_PLAYER, "ZP_CSO_STATS", zp_username[id], LANG_PLAYER, "ZP_CSO_KILLTOTAL", zp_cso_kill_total[id], LANG_PLAYER, "ZP_CSO_POINTTOTAL", zp_cso_points[id], LANG_PLAYER, "ZP_CSO_DMG_LVL", zp_dmg_lvl, LANG_PLAYER, "ZP_CSO_FIREPOWER", LANG_PLAYER, "ZP_CSO_PERCENT", str_to_num(zp_dmg_percent[zp_dmg_lvl]))
  1438. }
  1439.  
  1440. ShowSyncHudMsg(id, zp_cso_hud_sync2, iMsg)
  1441. }
  1442.  
  1443. /*---------------------------------------------*
  1444.  [ ZP CSO Plugin Public Functions: HUD Scoreboard ]
  1445. *---------------------------------------------*/
  1446.  
  1447. public zp_cso_hud_score(id)
  1448. {
  1449. if(!is_user_alive(id))
  1450. return PLUGIN_CONTINUE
  1451.  
  1452. new iMsg[600], zp_hmnum, zp_zbnum, zp_roundnum
  1453.  
  1454. zp_hmnum = zp_get_human_count()
  1455. zp_zbnum = zp_get_zombie_count()
  1456. zp_roundnum = zp_cso_round
  1457.  
  1458. set_hudmessage( 0, 250, 0, -1.0, 0.0, 0, 6.0, 1.1, 0.0, 0.0, -1)
  1459. format(iMsg, charsmax(iMsg), "/ %L \^n( HM [ %L ] | %02i | [ %L %02i ] | %02i | [ %L ] ZB )^n\ | %02i | [ VS ] | %02i | /", LANG_PLAYER, "ZP_CSO_TITLE", LANG_PLAYER, "ZP_CSO_HUMANS", zp_cso_humanswins, LANG_PLAYER, "ZP_CSO_ROUNDS", zp_roundnum, zp_cso_zombieswins, LANG_PLAYER, "ZP_CSO_ZOMBIES", zp_hmnum, zp_zbnum)
  1460. ShowSyncHudMsg(id, zp_cso_hud_sync3, iMsg)
  1461.  
  1462. return PLUGIN_CONTINUE
  1463. }
  1464.  
  1465. /*---------------------------------------------*
  1466.  [ ZP CSO Plugin Public Functions: KILL! Time Check ]
  1467. *---------------------------------------------*/
  1468.  
  1469. public zp_check_kill_time(id)
  1470. {
  1471. if(zp_cso_kill_time[id] == zp_cso_kill_time_end)
  1472. {
  1473. zp_cso_kill_lvl[id] = 0
  1474.  
  1475. return PLUGIN_CONTINUE
  1476. }
  1477.  
  1478. zp_cso_kill_time[id] += 1
  1479.  
  1480. return PLUGIN_CONTINUE
  1481. }
  1482.  
  1483. /*---------------------------------------------*
  1484.  [ ZP CSO Plugin Public Functions: Stats Loader ]
  1485. *---------------------------------------------*/
  1486.  
  1487. public zp_cso_load(id)
  1488. {
  1489. zp_cso_load_stats(id)
  1490. }
  1491.  
  1492. /*---------------------------------------------*
  1493.  [ ZP CSO Plugin Public Functions: Stats Saver ]
  1494. *---------------------------------------------*/
  1495.  
  1496. public zp_cso_save(id)
  1497. {
  1498. zp_cso_save_stats(id)
  1499. }
  1500.  
  1501. /*---------------------------------------------*
  1502.  [ ZP CSO Plugin Public Functions: Register CZBots ]
  1503. *---------------------------------------------*/
  1504.  
  1505. public zp_cso_register_czbot(id)
  1506. {
  1507. if (zp_cso_czbot || !is_user_connected(id) || !is_user_bot(id))
  1508. return PLUGIN_CONTINUE
  1509.  
  1510. RegisterHamFromEntity(Ham_TakeDamage, id, "zp_cso_takedamage")
  1511.  
  1512. zp_cso_czbot = true
  1513.  
  1514. return PLUGIN_CONTINUE
  1515. }
  1516.  
  1517. /*------------------------------------------------------------------------------------------*
  1518.  [ ZP CSO Plugin Internal Functions ]
  1519. *------------------------------------------------------------------------------------------*/
  1520.  
  1521. /*---------------------------------------------*
  1522.  [ ZP CSO Plugin Internal Functions: HM Level Up Effect ]
  1523. *---------------------------------------------*/
  1524.  
  1525. zp_cso_damage_plus(Human, Damage_Plus)
  1526. {
  1527. if (!is_user_alive(Human) || zp_get_user_zombie(Human))
  1528. return PLUGIN_CONTINUE
  1529.  
  1530. if(zp_cso_hmlvl == 0)
  1531. return PLUGIN_CONTINUE
  1532.  
  1533. new Float: zp_origin[3], zp_r, zp_g, zp_b, iSound, iSpeak[64], iText[64]
  1534.  
  1535. zp_r = zp_cso_hmlvl_r[Damage_Plus]
  1536. zp_g = zp_cso_hmlvl_g[Damage_Plus]
  1537. zp_b = zp_cso_hmlvl_b[Damage_Plus]
  1538.  
  1539. pev(Human, pev_origin, zp_origin)
  1540.  
  1541. engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, zp_origin, 0)
  1542.  
  1543. write_byte(TE_BEAMCYLINDER)
  1544.  
  1545. engfunc(EngFunc_WriteCoord, zp_origin[0])
  1546. engfunc(EngFunc_WriteCoord, zp_origin[1])
  1547. engfunc(EngFunc_WriteCoord, zp_origin[2])
  1548. engfunc(EngFunc_WriteCoord, zp_origin[0])
  1549. engfunc(EngFunc_WriteCoord, zp_origin[1])
  1550. engfunc(EngFunc_WriteCoord, zp_origin[2] + 100.0)
  1551.  
  1552. write_short(zp_cso_lvlspr)
  1553.  
  1554. write_byte(0)
  1555. write_byte(0)
  1556. write_byte(4)
  1557. write_byte(60)
  1558. write_byte(0)
  1559. write_byte(zp_r)
  1560. write_byte(zp_g)
  1561. write_byte(zp_b)
  1562. write_byte(200)
  1563. write_byte(0)
  1564.  
  1565. message_end()
  1566.  
  1567. iSound = random_num(0, charsmax(zp_cso_human_lvlup))
  1568. copy(iSpeak, charsmax(iSpeak), zp_cso_human_lvlup[iSound])
  1569. client_cmd(Human,"speak ^"%s^"", iSpeak)
  1570.  
  1571. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_DMG_LVLUP_NOTICE", Damage_Plus)
  1572. zp_clientcenter_text(Human, iText)
  1573.  
  1574. zp_cso_setrendering(Human)
  1575. zp_cso_setrendering(Human, kRenderFxGlowShell, zp_r, zp_g, zp_b, kRenderNormal, 0)
  1576.  
  1577. return PLUGIN_CONTINUE
  1578. }
  1579.  
  1580. /*---------------------------------------------*
  1581.  [ ZP CSO Plugin Internal Functions: Respawn Effect ]
  1582. *---------------------------------------------*/
  1583.  
  1584. zp_effect_respawn(iVictim)
  1585. {
  1586. static Float: zp_origin[3]
  1587.  
  1588. pev(iVictim, pev_origin, zp_origin)
  1589.  
  1590. message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  1591.  
  1592. write_byte(TE_EXPLOSION)
  1593.  
  1594. write_coord(floatround(zp_origin[0]))
  1595. write_coord(floatround(zp_origin[1]))
  1596. write_coord(floatround(zp_origin[2]))
  1597.  
  1598. write_short(zp_cso_respawnspr)
  1599.  
  1600. write_byte(10)
  1601. write_byte(20)
  1602. write_byte(14)
  1603.  
  1604. message_end()
  1605. }
  1606.  
  1607. /*---------------------------------------------*
  1608.  [ ZP CSO Plugin Internal Functions: No Respawn Message ]
  1609. *---------------------------------------------*/
  1610.  
  1611. zp_zbrespawn_msg2(iVictim)
  1612. {
  1613. if (zp_cso_roundstarted == 0 || !is_user_connected(iVictim) || is_user_alive(iVictim))
  1614. return PLUGIN_CONTINUE
  1615.  
  1616. new iText[64]
  1617.  
  1618. format(iText, charsmax(iText), "%L", LANG_PLAYER, "ZP_CSO_ZOMBIERESPAWN_MSG2")
  1619. zp_clientcenter_text(iVictim, iText)
  1620.  
  1621. return PLUGIN_CONTINUE
  1622. }
  1623.  
  1624. /*---------------------------------------------*
  1625.  [ ZP CSO Plugin Internal Functions: KILL! Announcer ]
  1626. *---------------------------------------------*/
  1627.  
  1628. zp_cso_announce_kill(id, zp_kill_lvl, zp_kill_type)
  1629. {
  1630. if (!is_user_alive(id))
  1631. return PLUGIN_CONTINUE
  1632.  
  1633. new iSpeak[64], iSound, iMsg[600], zp_r, zp_g, zp_b
  1634.  
  1635. if(zp_kill_type == 0)
  1636. {
  1637. iSound = zp_kill_lvl - 1
  1638. copy(iSpeak, charsmax(iSpeak), zp_cso_kill_sounds1[iSound])
  1639. format(iMsg, 63,"%i %L", zp_kill_lvl, LANG_PLAYER, "ZP_CSO_KILL")
  1640. }
  1641. else if(zp_kill_type == 1)
  1642. {
  1643. iSound = zp_kill_type - 1
  1644. copy(iSpeak, charsmax(iSpeak), zp_cso_kill_sounds2[iSound])
  1645. format(iMsg, 63,"%i %L %L", zp_kill_lvl, LANG_PLAYER, "ZP_CSO_KILL", LANG_PLAYER, "ZP_CSO_KNIFE")
  1646. }
  1647. else if(zp_kill_type == 2)
  1648. {
  1649. iSound = zp_kill_type - 1
  1650. copy(iSpeak, charsmax(iSpeak), zp_cso_kill_sounds2[iSound])
  1651. format(iMsg, 63,"%i %L %L", zp_kill_lvl, LANG_PLAYER, "ZP_CSO_KILL", LANG_PLAYER, "ZP_CSO_GRENADE")
  1652. }
  1653. else if(zp_kill_type == 3)
  1654. {
  1655. iSound = zp_kill_type - 1
  1656. copy(iSpeak, charsmax(iSpeak), zp_cso_kill_sounds2[iSound])
  1657. format(iMsg, 63,"%i %L %L", zp_kill_lvl, LANG_PLAYER, "ZP_CSO_KILL", LANG_PLAYER, "ZP_CSO_HEADSHOT")
  1658. }
  1659.  
  1660. zp_r = zp_cso_kill_r[zp_kill_lvl]
  1661. zp_g = zp_cso_kill_g[zp_kill_lvl]
  1662. zp_b = zp_cso_kill_b[zp_kill_lvl]
  1663.  
  1664. set_hudmessage(zp_r, zp_g, zp_b, -1.0, 0.30, 0, 6.0, 6.0, 0.1, 0.2, -1)
  1665. ShowSyncHudMsg(id, zp_cso_hud_sync1, iMsg)
  1666. client_cmd(id,"speak ^"%s^"", iSpeak)
  1667.  
  1668. if(zp_cso_kill_lvl[id] == zp_cso_maxkills)
  1669. {
  1670. zp_cso_kill_lvl[id] = 0
  1671. }
  1672.  
  1673. return PLUGIN_CONTINUE
  1674. }
  1675.  
  1676. /*---------------------------------------------*
  1677.  [ ZP CSO Plugin Internal Functions: Countdown Chant ]
  1678. *---------------------------------------------*/
  1679.  
  1680. zp_cso_chantdown()
  1681. {
  1682. new iChant[64], iSound
  1683.  
  1684. iSound = zp_cso_sec
  1685.  
  1686. if(iSound == -1)
  1687. return PLUGIN_CONTINUE
  1688.  
  1689. copy(iChant, charsmax(iChant), zp_cso_countchant[iSound])
  1690. client_cmd(0,"speak ^"%s^"", iChant)
  1691.  
  1692. return PLUGIN_CONTINUE
  1693. }
  1694.  
  1695. /*---------------------------------------------*
  1696.  [ ZP CSO Plugin Internal Functions: Zombie Evolution ]
  1697. *---------------------------------------------*/
  1698.  
  1699. zp_cso_evolution(iInfector, Evolution)
  1700. {
  1701. if (!is_user_alive(iInfector) || !zp_get_user_zombie(iInfector))
  1702. return PLUGIN_CONTINUE
  1703.  
  1704. new zp_evo_hp, zp_evo_armor, iSound, iSpeak[64]
  1705.  
  1706. zp_evo_hp = zp_get_zombie_maxhealth(iInfector) + str_to_num(zp_cso_evo_hp_lvl[Evolution])
  1707. zp_evo_armor = str_to_num(zp_cso_evo_armor_lvl[Evolution])
  1708.  
  1709. set_user_health(iInfector, zp_evo_hp)
  1710. ExecuteForward(zp_cso_evohp_forward, zp_cso_forward_dummyresult, iInfector, zp_evo_hp)
  1711.  
  1712. set_user_armor(iInfector, zp_evo_armor)
  1713. ExecuteForward(zp_cso_evo_armor_forward, zp_cso_forward_dummyresult, iInfector, zp_evo_armor)
  1714.  
  1715. iSound = random_num(0, charsmax(zp_cso_zombie_lvlup))
  1716.  
  1717. if(zp_cso_zblvl[iInfector] == 0)
  1718. return PLUGIN_CONTINUE
  1719.  
  1720. copy(iSpeak, charsmax(iSpeak), zp_cso_zombie_lvlup[iSound])
  1721. client_cmd(iInfector, "speak ^"%s^"", iSpeak)
  1722.  
  1723. return PLUGIN_CONTINUE
  1724. }
  1725.  
  1726. /*---------------------------------------------*
  1727.  [ ZP CSO Plugin Internal Functions: Load Stats ]
  1728. *---------------------------------------------*/
  1729.  
  1730. zp_cso_load_stats(id)
  1731. {
  1732. new iKey[64], iData[256], iPlayerTotalPoints[32], iPlayerTotalKills[32]
  1733.  
  1734. format(iKey, 63, "%s-zp40-csotheme", zp_cso_authid[id])
  1735. nvault_get(zp_cso_vault, iKey, iData, 255)
  1736.  
  1737. replace_all(iData, 255, "#", " ")
  1738. parse(iData, iPlayerTotalPoints, 31, iPlayerTotalKills, 31)
  1739. zp_cso_points[id] = str_to_num(iPlayerTotalPoints)
  1740. zp_cso_kill_total[id] = str_to_num(iPlayerTotalKills)
  1741.  
  1742. return PLUGIN_CONTINUE
  1743. }
  1744.  
  1745. /*---------------------------------------------*
  1746.  [ ZP CSO Plugin Internal Functions: Save Stats ]
  1747. *---------------------------------------------*/
  1748.  
  1749. zp_cso_save_stats(id)
  1750. {
  1751. new iKey[64], iData[256]
  1752.  
  1753. format(iKey, 63, "%s-zp40-csotheme", zp_cso_authid[id])
  1754. format(iData,255,"%i#%i#",zp_cso_points[id], zp_cso_kill_total[id])
  1755. nvault_set(zp_cso_vault, iKey, iData)
  1756.  
  1757. return PLUGIN_CONTINUE
  1758. }
  1759.  
  1760. /*------------------------------------------------------------------------------------------*
  1761.  [ ZP CSO Plugin Stocks ]
  1762. *------------------------------------------------------------------------------------------*/
  1763.  
  1764. /*---------------------------------------------*
  1765.  [ ZP CSO Plugin Stocks: Center Text ]
  1766. *---------------------------------------------*/
  1767.  
  1768. stock zp_clientcenter_text(id, zp_message[])
  1769. {
  1770. new dest
  1771. if (id) dest = MSG_ONE
  1772. else dest = MSG_ALL
  1773.  
  1774. message_begin(dest, zp_center_textmsg, {0,0,0}, id)
  1775. write_byte(4)
  1776. write_string(zp_message)
  1777. message_end()
  1778. }
  1779.  
  1780. /*---------------------------------------------*
  1781.  [ ZP CSO Plugin Stocks: Client Set Render ]
  1782. *---------------------------------------------*/
  1783.  
  1784. stock zp_cso_setrendering(Human, zp_fx = kRenderFxNone, zp_r = 255, zp_g = 255, zp_b = 255, zp_render = kRenderNormal, zp_amount = 16)
  1785. {
  1786. static Float: zp_color[3]
  1787.  
  1788. zp_color[0] = float(zp_r)
  1789. zp_color[1] = float(zp_g)
  1790. zp_color[2] = float(zp_b)
  1791.  
  1792. set_pev(Human, pev_renderfx, zp_fx)
  1793. set_pev(Human, pev_rendercolor, zp_color)
  1794. set_pev(Human, pev_rendermode, zp_render)
  1795. set_pev(Human, pev_renderamt, float(zp_amount))
  1796. }
  1797.  
  1798. /*------------------------------------------------------------------------------------------*
  1799.  [ ZP CSO Plugin Natives ]
  1800. *------------------------------------------------------------------------------------------*/
  1801.  
  1802. /*---------------------------------------------*
  1803.  [ ZP CSO Plugin Natives: Get Evo Health ]
  1804. *---------------------------------------------*/
  1805.  
  1806. public zp_cso_native_evohp(id)
  1807. {
  1808. new zp_evohp
  1809.  
  1810. zp_evohp = zp_get_zombie_maxhealth(id) + str_to_num(zp_cso_evo_hp_lvl[zp_cso_zblvl[id]])
  1811.  
  1812. return zp_evohp
  1813. }
  1814.  
  1815. /*---------------------------------------------*
  1816.  [ ZP CSO Plugin Natives: Get Evo Armor ]
  1817. *---------------------------------------------*/
  1818.  
  1819. public zp_cso_native_evo_armor(id)
  1820. {
  1821. new zp_evo_armor
  1822.  
  1823. zp_evo_armor = str_to_num(zp_cso_evo_armor_lvl[zp_cso_zblvl[id]])
  1824.  
  1825. return zp_evo_armor
  1826. }
  1827. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  1828. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
  1829. */
  1830.