HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Script generated by Pawn Studio */
  2.  
  3. #include <amxmodx>
  4. #include <hamsandwich>
  5. #include <engine>
  6. #include <zombieplague>
  7.  
  8. #define PLUGIN "[ZP] Addon : Laser Destroy Preventer"
  9. #define AUTHOR "Hezerf"
  10. #define VERSION "1.1"
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15. RegisterHam(Ham_TakeDamage,"func_breakable","fw_TakeDamage");
  16. }
  17.  
  18. public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
  19. {
  20. //Victim is not lasermine.
  21. new sz_classname[32]
  22. entity_get_string( victim , EV_SZ_classname , sz_classname , 31 )
  23. if( !equali(sz_classname,"lasermine") )
  24. return HAM_IGNORED;
  25.  
  26. //Attacker is zombie
  27. if( zp_get_user_zombie( attacker ) )
  28. return HAM_IGNORED;
  29.  
  30. //Block Damage
  31. return HAM_SUPERCEDE;
  32. }
  33.