|
如果服务器开启了玩家死亡自爆效果插件(jetpack_explode.amxx),那么玩家死后就会爆炸并且能听到爆炸声的音效。
但我看了插件的源代码,里面并没有出现相关的音频,但玩家死后却可以听到爆炸的声音,这是为什么呢?另外,怎样才能把插件中爆炸声去除呢?
- #include <amxmodx>
- new gexplo
- new dexplo
- public plugin_init(){
- register_plugin("Jetpack Explode","2.8","EJL & X-man")
- register_cvar("jetpack_explode","1")
- register_event("DeathMsg", "DeathEvent", "a")
- }
- public plugin_precache(){
- dexplo = precache_model("sprites/dexplo.spr")
- gexplo = precache_model("sprites/gexplo.spr")
- return PLUGIN_CONTINUE
- }
- public DeathEvent(){
- if ( !get_cvar_num("jetpack_explode") )
- return PLUGIN_CONTINUE
- new victim = read_data(2)
- explode(victim,gexplo,40,120)
- explode(victim,dexplo,35,0)
- return PLUGIN_CONTINUE
- }
- explode(id,sprite,scale,offset){
- new vec1[3]
- get_user_origin(id,vec1)
- //Explosion2
- message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
- write_byte( 12 )
- write_coord(vec1[0])
- write_coord(vec1[1])
- write_coord(vec1[2])
- write_byte( 188 ) // byte (scale in 0.1's) 188
- write_byte( 10 ) // byte (framerate)
- message_end()
- //TE_Explosion
- message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
- write_byte( 3 )
- write_coord(vec1[0])
- write_coord(vec1[1])
- write_coord(vec1[2]+offset)
- write_short( sprite )
- write_byte( scale ) // byte (scale in 0.1's) 188
- write_byte( 10 ) // byte (framerate)
- write_byte( 0 ) // byte flags
- message_end()
- }
复制代码 |
|