|
发表于 2006-1-3 14:45:04
|
显示全部楼层
来自 中国–河南–三门峡
回复: AMXX论坛上的2个插件
击中声效源码 如下
- #include <amxmodx>
- #include <amxmisc>
- #include <engine>
- #include <fun>
- public plugin_init()
- {
- register_plugin("Hit notifications","0.1","DahVid")
- register_event("Damage", "got_hit", "b")
- register_cvar("hn_redflash","1")
- register_cvar("hn_shake","1")
- register_cvar("hn_beep","1")
- }
- public plugin_precache()
- {
- precache_sound("buttons/blip2.wav")
- }
- public got_hit(id)
- {
- if(is_user_alive(id) && is_user_connected(id)) {
- if(get_cvar_num("hn_redflash")) {
- message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
- write_short(25)
- write_short(25)
- write_short(9)
- write_byte(255)
- write_byte(0)
- write_byte(0)
- write_byte(100)
- message_end()
- }
- if(get_cvar_num("hn_shake")) {
- message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id)
- write_short(10000)
- write_short(500)
- write_short(500)
- message_end()
- }
- if(get_cvar_num("hn_beep")) {
- new attacker=get_user_attacker(id)
- if(attacker>0) {
- client_cmd(attacker,"spk buttons/blip2.wav")
- }
- }
- }
- return PLUGIN_HANDLED
- }
复制代码
死亡红色屏幕没有源码 是原来 AMX0.93下的一个插件 属于古董级的
所有插件在DT论坛都曾经发布过的 如果留意搜索一下即可获得
PS 你发的击中不同部位获得不同奖励 少了语言文件 :confused: |
|