Raised This Month: $12 Target: $400
 3% 

Emit Sounds...


Post New Thread Reply   
 
Thread Tools Display Modes
Tupac
Junior Member
Join Date: May 2005
Location: h00d
Old 08-03-2005 , 04:45  
Reply With Quote #31

with that big plugin i was talking about it keeps crashing
soi i have decided to make the plugin in steps to see
if i can get it going properly...
Compiled fine tried it thou one problem v3x
the sounds where emited man
u could still hear the knife plus i had to download as
going in the server and the end sounds played so
the plugin was running!

sorry about all the includes i just had to quickly skim across
from the old plugin which needed all of them meh wouldnt hury so
are u able to help me plz

Thanks bud.

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_clcmd("array_go","check_uncheck")         register_forward( FM_EmitSound, "EmitSound" ) } public plugin_precache() {     precache_sound("sound/misc/DVTheme.wav")     precache_sound("sound/misc/JediTheme.wav")     precache_sound("sound/weapons/saber_ignite.wav")     precache_sound("sound/weapons/saber_hit1.wav")     precache_sound("sound/weapons/saber_hit2.wav")     precache_sound("sound/weapons/saber_hit3.wav")     precache_sound("sound/weapons/saber_hit4.wav")     precache_sound("sound/weapons/saber_hitwall1.wav")     precache_sound("sound/weapons/saber_slash1.wav")     precache_sound("sound/weapons/saber_slash2.wav")     precache_sound("sound/weapons/saber_stab.wav") } 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, "sound/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, "sound/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, "sound/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, "sound/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, "sound/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, "sound/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, "sound/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, "sound/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, "sound/weapons/saber_stab.wavv", 1.0, ATTN_NORM, 0, PITCH_NORM ); return FMRES_SUPERCEDE; } }       return FMRES_IGNORED; }
__________________
Tupac is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:01.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode