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音效就全改了
|