Hi Its Me again Maybe this is the last time im asking about something in SH scripting But, Can Someone Tell me How precache Sounds to Models, Because I have a awsmn Sword Model And I need TO Precache Sounds TO it but I Dont Really Know How TO to that
.
public plugin_precache()
{
precache_model("models/shmod/messiah_v_knife.mdl")
precache_model("models/shmod/messiah_p_knife.mdl")
precache_sound("sound/shmod/messiah/knife_hit1.wav")
precache_sound("sound/shmod/messiah/knife_hit2.wav")
precache_sound("sound/shmod/messiah/knife_hit3.wav")
precache_sound("sound/shmod/messiah/knife_hit4.wav")
precache_sound("sound/shmod/messiah/knife_hitwall1.wav")
precache_sound("sound/shmod/messiah/knife_slash1.wav")
precache_sound("sound/shmod/messiahknife_slash2.wav")
precache_sound("sound/shmod/knife_stab.wav")
}
after That :
{
public weaponChange(id)
{
if ( !gHasMessiahPowers[id] || !shModActive() ) return
new wpnid = read_data(2)
if ( wpnid != CSW_KNIFE ) return
else {
switchmodel(id)
}
}
and Last :
public switchmodel(id)
{
if ( !is_user_alive(id) ) return
else {
entity_set_string(id, EV_SZ_viewmodel, "models/shmod/messiah_v_knife.mdl")
entity_set_string(id, EV_SZ_viewmodel, "models/shmod/messiah_p_knife.mdl")
}
}
So I have 2 Questions:
1st How Do I put The Sounds So Superhero Knows They Are Used With The Sword Model
And
2nd Do I Have To Put Something Inbetween these to functions to make the sounds emit
Thank you if Who Ever You R