teamplay 发表于 2006-6-3 20:19:02

【发布】修正无声C4的插件代码,自己编译吧!

测试服务器地址:
221.204.251.178:27015 - 27018

密码: bisai


#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

new const gs_PLUGIN[] = "Anti-Silent Plant"
new const gs_VERSION[] = "1.6"
new const gs_AUTHOR[] = "eSport.sX.cn"

new gs_c4_model[] = "models/w_c4.mdl"

new bool: gb_CheckSound
new bool: gb_EntReadyForUse
new bool: gb_OriginChanged

new Float: gf_volume
new Float: gf_attenuation
new Float: gf_c4origin
new Float: gf_entorigin

new gi_flags
new gi_pitch

new g_c4entity
new g_entillusionary
new g_classname

new gi_soundnum

new g_sounds[] =
{
"weapons/c4_beep1.wav",
"weapons/c4_beep2.wav",
"weapons/c4_beep3.wav",
"weapons/c4_beep4.wav",
"weapons/c4_beep5.wav"
}

public plugin_init ()
{
register_plugin ( gs_PLUGIN, gs_VERSION, gs_AUTHOR )
register_cvar ( "antisilentplant_version", gs_VERSION, FCVAR_SERVER|FCVAR_SPONLY )

if ( engfunc ( EngFunc_FindEntityByString, -1, "classname", "func_bomb_target" ) )
{
register_logevent ( "fn_triggerplanted" , 3, "1=triggered", "2=Planted_The_Bomb" )
register_logevent ( "fn_triggerroundstart" , 2, "1=Round_Start" )
register_forward ( FM_EmitSound, "fn_soundcheck" )
}

gb_EntReadyForUse = false
}
public fn_triggerplanted ()
{
gb_CheckSound = true
}
public fn_triggerroundstart ()
{
gb_CheckSound = false
gb_OriginChanged = false
}
public fn_soundcheck ( entity, i_channel, const s_SOUND[], Float: f_volume, Float: f_attenuation, i_flags, i_pitch )
{
if ( gb_CheckSound == true )
{
for ( gi_soundnum = 0; gi_soundnum < 5; gi_soundnum++ )
{
   if ( equali ( s_SOUND, g_sounds ) )
   {
    gf_volume = f_volume
    gf_attenuation = f_attenuation
    gi_flags = i_flags
    gi_pitch = i_pitch
   
    if ( gb_EntReadyForUse == true && gb_OriginChanged == true )
    {
   fn_emitsound ()
   
   return FMRES_SUPERCEDE
    }
   
    else if ( gb_EntReadyForUse == true && ! gb_OriginChanged == true )
    {
   fn_changeorigin ()
   
   return FMRES_SUPERCEDE
    }
   
    else
    {
   fn_createentity ()
   
   return FMRES_SUPERCEDE
    }
   }
}
}

return FMRES_IGNORED
}
public fn_createentity ()
{
g_classname = engfunc ( EngFunc_AllocString, "func_illusionary" )
g_entillusionary = engfunc ( EngFunc_CreateNamedEntity, g_classname )

gb_EntReadyForUse = true

fn_changeorigin ()
}
public fn_changeorigin ()
{
g_c4entity = engfunc ( EngFunc_FindEntityByString, -1, "model", gs_c4_model )
pev ( g_c4entity, pev_origin, gf_c4origin )
gf_entorigin = gf_c4origin
engfunc ( EngFunc_SetOrigin, g_entillusionary, gf_entorigin )

gb_OriginChanged = true

fn_emitsound ()
}
public fn_emitsound ()
{
emit_sound ( g_entillusionary, 0, g_sounds, gf_volume, gf_attenuation, gi_flags, gi_pitch )
}


//改了改标题

gearfox 发表于 2006-6-3 22:51:09

回复: 修正无声C4的插件代码,自己编译吧!

不会编译郁闷,请发上来amxx插件吧。。。
我的是1.60的

lkj9017 发表于 2006-6-3 23:03:07

回复: 修正无声C4的插件代码,自己编译吧!

amxx 1.60 compiled.....

gearfox 发表于 2006-6-3 23:26:10

回复: 修正无声C4的插件代码,自己编译吧!

谢谢楼主和楼上的朋友。谢谢

gearfox 发表于 2006-6-3 23:38:53

回复: 修正无声C4的插件代码,自己编译吧!

我开启了FakeMeta模块了。但是还是没有效果:cry:
   请楼上的朋友帮帮可怜的我

teamplay 发表于 2006-6-4 01:01:50

回复: 修正无声C4的插件代码,自己编译吧!

不会啊,很多人来我们的服务器测试,没有问题!

AE86 发表于 2006-6-4 01:50:44

回复: 修正无声C4的插件代码,自己编译吧!

gearfox的服务器和客户端是什么版本,怎么C4没声音呢。

gearfox 发表于 2006-6-4 03:19:10

回复: 修正无声C4的插件代码,自己编译吧!

服务器因为3382的跳PING,就换成2834的了
客户端 ESAI 3248的

tangtangl 发表于 2006-6-4 07:56:47

回复: 修正无声C4的插件代码,自己编译吧!

谢谢哈,找了好久了.
页: [1]
查看完整版本: 【发布】修正无声C4的插件代码,自己编译吧!