Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1|回复: 0
打印 上一主题 下一主题

[代码|Code]强弱判定系统|Power Struggle System

[复制链接]

189

主题

189

帖子

580

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
580
跳转到指定楼层
楼主
发表于 2017-7-13 16:27:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

  4. public plugin_init()  
  5. {  
  6.     register_plugin( "PowerStruggleEditEntry", "1.0", "ESFKAMI" );  

  7.     register_message( get_user_msgid( "PowerStrug" ), "PowerStruggle" );
  8. }

  9. public PowerStruggle( MsgID, Dest, Client )// Hook  
  10. {
  11.     if( get_msg_arg_int( 1 ) == 127 ) return;

  12.     if( get_pdata_int( Client, 198 ) == 1 )// 挡波时|Block Struggle
  13.     {
  14.         if( get_msg_arg_int( 1 ) < 0 )// 快挡不住时|While the client is going to lose
  15.         {  
  16.             entity_set_float( Client, EV_FL_fuser4, 1000.0 );
  17.             client_print( Client, print_center, "[Blocking] %d", get_msg_arg_int( 1 ) );

  18.             // Add your own effects here...
  19.         }

  20.         if( get_msg_arg_int( 1 ) > 0 )// 快把波弹开时|While the client is going to win
  21.         {  
  22.             entity_set_float( Client, EV_FL_fuser4, 10.000_000 );
  23.             client_print( Client, print_center, "[Blocking] %d", get_msg_arg_int( 1 ) );

  24.             // Add your own effects here...
  25.         }
  26.     }
  27.     else // 对波时|Beam Struggle
  28.     {
  29.         if( get_msg_arg_int( 1 ) < 0 ) // 快对不过敌人时|While the client is going to lose
  30.         {  
  31.             entity_set_float( Client, EV_FL_fuser4, 1000.000_000 );
  32.             client_print( Client, print_center, "%d", get_msg_arg_int( 1 ) );

  33.             // Add your own effects here...
  34.         }

  35.         if( get_msg_arg_int( 1 ) > 0 ) // 快对过敌人时|While the client is going to win
  36.         {  
  37.             entity_set_float( Client, EV_FL_fuser4, 10.000_000 );
  38.             client_print( Client, print_center, "%d", get_msg_arg_int( 1 ) );

  39.             // Add your own effects here...
  40.         }
  41.     }

  42.     //set_msg_arg_int( 1, ARG_CHAR, 100 );// -100 ~ 100: -100 = lose, 100 = win, this only changes the StruggleHud of clients. 本参数只能在HUD表面上给对波强弱判定进度条位置做出改变[]
  43. }
复制代码
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Comsenz Inc.  

GMT+8, 2026-10-26 05:52 , Processed in 0.234092 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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