【发布】修正无声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 )
}
//改了改标题
回复: 修正无声C4的插件代码,自己编译吧!
不会编译郁闷,请发上来amxx插件吧。。。我的是1.60的
回复: 修正无声C4的插件代码,自己编译吧!
amxx 1.60 compiled.....回复: 修正无声C4的插件代码,自己编译吧!
谢谢楼主和楼上的朋友。谢谢回复: 修正无声C4的插件代码,自己编译吧!
我开启了FakeMeta模块了。但是还是没有效果:cry:请楼上的朋友帮帮可怜的我
回复: 修正无声C4的插件代码,自己编译吧!
不会啊,很多人来我们的服务器测试,没有问题!回复: 修正无声C4的插件代码,自己编译吧!
gearfox的服务器和客户端是什么版本,怎么C4没声音呢。回复: 修正无声C4的插件代码,自己编译吧!
服务器因为3382的跳PING,就换成2834的了客户端 ESAI 3248的
回复: 修正无声C4的插件代码,自己编译吧!
谢谢哈,找了好久了.
页:
[1]