|
|
- #include <amxmodx>
- public plugin_init()
- {
- register_plugin("MeleeHudText Hook", "1.0", "ESFKAMI")
- register_clcmd("test", "TestMeleeHud")
- register_message(get_user_msgid("MeleeTxtHud"), "MeleeText")
- }
- public TestMeleeHud(id)//Test
- {
- for(new i = 0; i <= 17; i++)
- {
- message_begin( MSG_ALL, get_user_msgid("MeleeTxtHud") );
- /*
- Melee Type List(肉搏类型[]):
- 1 = Hit
- 2 = Combo
- 3 = Damage
- 4 = Sword Kill
- 10 = Dodged
- 11 = Block Breaker
- 12 = You Win
- 13 = You Lose
- 14 = Tie
- 15 = Hand on
- 16 = Power Hit
- 17 = Prepunch
- */
- write_byte( i );
- //如果肉搏类型是:1(Hit)或者是3(Damage), 那么就在这里填一个整数值,不然直接填个0就行了[] If the Melee type is 1(Hit) or 3(Damage), then set the value here, otherwise just write 0.
- write_byte( 13 );
- message_end()
- }
- }
- public MeleeText(MsgID, dest, Client)//Hook
- {
- if(get_msg_arg_int(1) == 1) //Hit
- {
- //...
- }
- if(get_msg_arg_int(1) == 2) //Combo
- {
-
- //...
- }
- if(get_msg_arg_int(1) == 3) //Damage
- {
- //...
- }
- if(get_msg_arg_int(1) == 4) //Sword Kill
- {
- //...
- }
- if(get_msg_arg_int(1) == 10) //Dodged
- {
- //...
- }
- if(get_msg_arg_int(1) == 11) //Block Breaker
- {
- //...
- }
- if(get_msg_arg_int(1) == 12) //You Win
- {
- //...
- }
- if(get_msg_arg_int(1) == 13) //You Lose
- {
- //...
- }
- if(get_msg_arg_int(1) == 14) //Tie
- {
- //...
- }
- if(get_msg_arg_int(1) == 15) //Hand on
- {
- //...
- }
- if(get_msg_arg_int(1) == 16)//Power Hit
- {
- //...
- }
- if(get_msg_arg_int(1) == 17)//Prepunch
- {
- //...
- }
- }
复制代码 |
|