ChaosX
哈哈哈~你看看你!
|
分享:
▲
▼
ak47吗?
在public plugin_precache()里面加上要用到的音效档 (音效档请放在sound资料夹内的任意处... 在此预设为sound资料夹内的weapons资料夹内的XXX资料夹) precache_sound("weapons/XXX/ak47-1.wav") precache_sound("weapons/XXX/ak47-2.wav") precache_sound("weapons/XXX/ak47_boltpull.wav") precache_sound("weapons/XXX/ak47_clipin.wav") precache_sound("weapons/XXX/ak47_clipout.wav")
在plugin_init()内加上 register_forward(FM_EmitSound, "fw_EmitSound")
之后在下方空白处加上 public fw_EmitSound(id, channel, const sample[]) { if (!is_user_connected(id) || !is_user_alive(id)) return FMRES_IGNORED; if (get_user_weapon(id) != CSW_AK47) return FMRES_IGNORED; if (equal(sample, "weapons/ak47-1.wav")) { engfunc(EngFunc_EmitSound, id, CHAN_WEAPON, "weapons/XXX/ak47-1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE; } if (equal(sample, "weapons/ak47-2.wav")) { engfunc(EngFunc_EmitSound, id, CHAN_WEAPON, "weapons/XXX/ak47-2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE; } if (equal(sample, "weapons/ak47_boltpull.wav")) { engfunc(EngFunc_EmitSound, id, CHAN_WEAPON, "weapons/XXX/ak47_boltpull.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE; } if (equal(sample, "weapons/ak47_clipin.wav")) { engfunc(EngFunc_EmitSound, id, CHAN_WEAPON, "weapons/XXX/ak47_clipin.wav", 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE; } if (equal(sample, "weapons/ak47_clipout.wav")) { engfunc(EngFunc_EmitSound, id, CHAN_WEAPON, weapons/XXX/ak47_clipout.wav, 1.0, ATTN_NORM, 0, PITCH_NORM) return FMRES_SUPERCEDE; } return FMRES_IGNORED; }
然后进游戏后你的ak47音效就全改了
|