anyway the sounds aint emited and canceling out the originals...
the model isn;t apeearing afta i changed my oldone to the same one as that Pimp guy...
Yes themes are playing...
Code:
#include <amxmodx>
#include <fakemeta>
#include <cstrike>
#include <engine>
#include <amxmisc>
#include <fun>
public plugin_init()
{
register_plugin("Star Wars","0.1","Front Line")
register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
register_event("CurWeapon", "weaponChange", "be", "1=1")
register_clcmd("array_go","check_uncheck")
register_forward( FM_EmitSound, "EmitSound" )
}
public plugin_precache()
{
precache_sound("misc/DVTheme.wav")
precache_sound("misc/JediTheme.wav")
precache_sound("weapons/saber_ignite.wav")
precache_sound("weapons/saber_hit1.wav")
precache_sound("weapons/saber_hit2.wav")
precache_sound("weapons/saber_hit3.wav")
precache_sound("weapons/saber_hit4.wav")
precache_sound("weapons/saber_hitwall1.wav")
precache_sound("weapons/saber_slash1.wav")
precache_sound("weapons/saber_slash2.wav")
precache_sound("weapons/saber_stab.wav")
precache_model("models/v_bluesaber.mdl")
}
public t_win()
{
client_cmd(0, "spk misc/DVTheme")
return PLUGIN_HANDLED
}
public ct_win()
{
client_cmd(0, "spk misc/JediTheme")
return PLUGIN_HANDLED
}
new array_go[33]
public check_uncheck(id)
{
if ( array_go[id] !=0 )
{
array_go[id] = 0
return PLUGIN_HANDLED
}
else
{
array_go[id] = 1
}
return PLUGIN_HANDLED
}
public EmitSound(entity, channel, const sound[])
{
if( entity > 32 || entity < 1 )
return FMRES_IGNORED;
if( array_go[entity] !=0 )
{
if( containi(sound, "sound/weapons/knife_deploy1.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_ignite.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_hit1.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_hit1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_hit2.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_hit2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_hit3.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_hit3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_hit4.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_hit4.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_hitwall1.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_hitwall1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_slash1.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_slash1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_slash2.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_slash2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
if( containi( sound, "sound/weapons/knife_stab.wav" ) != -1 )
{
emit_sound( entity, channel, "weapons/saber_stab.wav", 1.0, ATTN_NORM, 0, PITCH_NORM );
return FMRES_SUPERCEDE;
}
}
return FMRES_IGNORED;
}
public weaponChange(id)
if (get_cvar_num("dmk_on"))
{
new clip, ammo, wpnid = get_user_weapon(id,clip,ammo)
if (wpnid == CSW_KNIFE) {
entity_set_string(id,EV_SZ_viewmodel,"models/v_bluesaber")
entity_set_string(id, EV_SZ_viewmodel, "models/v_bluesaber.mdl")
}
}
thanks for your help blah blah etc i wanna get this going and release the BETA