请选择 进入手机版 | 继续访问电脑版
设为首页收藏本站

ESFKAMI

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz

ESFX

ESF: Xenoverse

ESF123

ESF1.2.3

EVM2.1

EVM2.1

ECXSSJ

ECX: TeamSSJ

ECX2.2

ECX RC2

ECX2.3

ECX RC3

查看: 1056|回复: 0

[代码|Code]显示伤害类型|Display Damage Type

[复制链接]

211

主题

216

帖子

1130

积分

ESFKAMI

Rank: 8Rank: 8

积分
1130
发表于 2017-7-13 16:50:33 | 显示全部楼层 |阅读模式

  1. #include < amxmodx >
  2. #include < fakemeta >
  3. #include < hamsandwich >

  4. public plugin_init( )
  5. {
  6.         register_plugin( "Damage Type Display", "1.0", "ESFKAMI" )
  7.         RegisterHam( Ham_TakeDamage, "player", "@TakeDamage", true )
  8. }

  9. public @TakeDamage( __int_Victim, __int_Inflictor, __int_Attacker, Float: __float_Damage, __bit_DamageType )
  10. {
  11.         switch( __bit_DamageType )
  12.         {
  13.                 case 0: client_print( __int_Victim, print_center, "Damage Type: DMG_GENERIC" )
  14.                 case (1<<0): client_print( __int_Victim, print_center, "Damage Type: DMG_CRUSH" )
  15.                 case (1<<1): client_print( __int_Victim, print_center, "Damage Type: DMG_BULLET" )
  16.                 case (1<<2): client_print( __int_Victim, print_center, "Damage Type: DMG_SLASH" )
  17.                 case (1<<3): client_print( __int_Victim, print_center, "Damage Type: DMG_BURN" )
  18.                 case (1<<4): client_print( __int_Victim, print_center, "Damage Type: DMG_FREEZE" )
  19.                 case (1<<5): client_print( __int_Victim, print_center, "Damage Type: DMG_FALL" )
  20.                 case (1<<6): client_print( __int_Victim, print_center, "Damage Type: DMG_BLAST" )
  21.                 case (1<<7): client_print( __int_Victim, print_center, "Damage Type: DMG_CLUB" )
  22.                 case (1<<8): client_print( __int_Victim, print_center, "Damage Type: DMG_SHOCK" )
  23.                 case (1<<9): client_print( __int_Victim, print_center, "Damage Type: DMG_SONIC" )
  24.                 case (1<<10): client_print( __int_Victim, print_center, "Damage Type: DMG_ENERGYBEAM" )
  25.                 case (1<<12): client_print( __int_Victim, print_center, "Damage Type: DMG_NEVERGIB" )
  26.                 case (1<<13): client_print( __int_Victim, print_center, "Damage Type: DMG_ALWAYSGIB" )
  27.                 case (1<<14): client_print( __int_Victim, print_center, "Damage Type: DMG_DROWN" )
  28.                 case (1<<15): client_print( __int_Victim, print_center, "Damage Type: DMG_PARALYZE" )
  29.                 case (1<<16): client_print( __int_Victim, print_center, "Damage Type: DMG_NERVEGAS" )
  30.                 case (1<<17): client_print( __int_Victim, print_center, "Damage Type: DMG_POISON" )
  31.                 case (1<<18): client_print( __int_Victim, print_center, "Damage Type: DMG_RADIATION" )
  32.                 case (1<<19): client_print( __int_Victim, print_center, "Damage Type: DMG_DROWNRECOVER" )
  33.                 case (1<<20): client_print( __int_Victim, print_center, "Damage Type: DMG_ACID" )
  34.                 case (1<<21): client_print( __int_Victim, print_center, "Damage Type: DMG_SLOWBURN" )
  35.                 case (1<<22): client_print( __int_Victim, print_center, "Damage Type: DMG_SLOWFREEZE" )
  36.                 case (1<<23): client_print( __int_Victim, print_center, "Damage Type: DMG_MORTAR" )
  37.                 case (~(0x3fff)): client_print( __int_Victim, print_center, "Damage Type: DMG_TIMEBASED" )
  38.                
  39.         }
  40. }
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|ESFKAMI    

GMT+8, 2018-4-25 06:46 , Processed in 0.236438 second(s), 22 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表