|
|
- #include < amxmodx >
- #include < engine >
- #include < fakemeta >
- public plugin_init()
- {
- register_plugin( "PowerStruggleEditEntry", "1.0", "ESFKAMI" );
- register_message( get_user_msgid( "PowerStrug" ), "PowerStruggle" );
- }
- public PowerStruggle( MsgID, Dest, Client )// Hook
- {
- if( get_msg_arg_int( 1 ) == 127 ) return;
- if( get_pdata_int( Client, 198 ) == 1 )// 挡波时|Block Struggle
- {
- if( get_msg_arg_int( 1 ) < 0 )// 快挡不住时|While the client is going to lose
- {
- entity_set_float( Client, EV_FL_fuser4, 1000.0 );
- client_print( Client, print_center, "[Blocking] %d", get_msg_arg_int( 1 ) );
- // Add your own effects here...
- }
- if( get_msg_arg_int( 1 ) > 0 )// 快把波弹开时|While the client is going to win
- {
- entity_set_float( Client, EV_FL_fuser4, 10.000_000 );
- client_print( Client, print_center, "[Blocking] %d", get_msg_arg_int( 1 ) );
- // Add your own effects here...
- }
- }
- else // 对波时|Beam Struggle
- {
- if( get_msg_arg_int( 1 ) < 0 ) // 快对不过敌人时|While the client is going to lose
- {
- entity_set_float( Client, EV_FL_fuser4, 1000.000_000 );
- client_print( Client, print_center, "%d", get_msg_arg_int( 1 ) );
- // Add your own effects here...
- }
- if( get_msg_arg_int( 1 ) > 0 ) // 快对过敌人时|While the client is going to win
- {
- entity_set_float( Client, EV_FL_fuser4, 10.000_000 );
- client_print( Client, print_center, "%d", get_msg_arg_int( 1 ) );
- // Add your own effects here...
- }
- }
- //set_msg_arg_int( 1, ARG_CHAR, 100 );// -100 ~ 100: -100 = lose, 100 = win, this only changes the StruggleHud of clients. 本参数只能在HUD表面上给对波强弱判定进度条位置做出改变[]
- }
复制代码 |
|