Raised This Month: $32 Target: $400
 8% 

C4 sound (planted bomb)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fjollerik
Member
Join Date: Jul 2007
Location: Denmark
Old 10-10-2008 , 13:39   C4 sound (planted bomb)
Reply With Quote #1

Hello guys..
Im looking for a plugin, who can play a sound (mp3 or wav) when the bomb is planted..
Ive found one "ultimate sounds" plugin who can play it, but it plays other sounds too and i cant turn it off :/

So.. i only need the sound to be played when the c4 is planted

ive tryed to search for it in here (AlliedModders) and google.. but i cant find it :/

(It would help me alot if the plugin could play mp3 files)
fjollerik is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 10-11-2008 , 10:45   Re: C4 sound (planted bomb)
Reply With Quote #2

hmm why not use the plugin called GHW Weapon Model Replacement, and replace the c4 sound with the mp3 or wav file? This plugin supports sounds and models

Link to the plugin:
http://forums.alliedmods.net/showthr...on+replacement
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 10-11-2008 , 20:53   Re: C4 sound (planted bomb)
Reply With Quote #3

PHP Code:
public plugin_init() 
    
register_logevent("bomb_planted"3"2=Planted_The_Bomb");
public 
bomb_planted()
        
emit_sound(0,CHAN_AUTO,"misc/bomb_planted.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM);
public 
plugin_precache() precache_sound("misc/bomb_planted.wav"); 
__________________

anakin_cstrike is offline
fjollerik
Member
Join Date: Jul 2007
Location: Denmark
Old 10-12-2008 , 14:29   Re: C4 sound (planted bomb)
Reply With Quote #4

Thanks guys.. you guys rock ;D
fjollerik is offline
fjollerik
Member
Join Date: Jul 2007
Location: Denmark
Old 01-23-2009 , 10:38   Re: C4 sound (planted bomb)
Reply With Quote #5

Okay.. the "GHW Weapon Model Replacement" wont let me replace the sound.
(Note 4: you cannot replace any sound files except for melee weapons.)

And the code/script anakin_cstrike vbmenu_register("postmenu_698549", true); gave me, is not working...
when i compile it (and it says Done).. I can't find the .amxx file in the compiled folder... i think theres something wrong with the code/script

So anyone else who can help me ?
fjollerik is offline
grzelak
Senior Member
Join Date: Sep 2008
Old 01-23-2009 , 12:42   Re: C4 sound (planted bomb)
Reply With Quote #6

13 seconds before bomb explode it will give sound misc/bomb.wav
Code:
#include <amxmodx>
#include <csx>

#define PLUGIN "Bomb Sound"
#define VERSION "0.1"
#define AUTHOR "SeBa"


#define muzyczka ("misc/bomb")
#define czas 13


new g_c4timer, pointnum;
new bool:b_planted = false;

new g_msgsync;

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);

pointnum = get_cvar_pointer("mp_c4timer");

register_logevent("newRound", 2, "1=Round_Start");
register_logevent("endRound", 2, "1=Round_End");
register_logevent("endRound", 2, "1&Restart_Round_");

g_msgsync = CreateHudSyncObj();
}

public newRound()
{
g_c4timer = -1;
remove_task(652450);
b_planted = false;
}

public endRound()
{
g_c4timer = -1;
remove_task(652450);
}

public bomb_planted()
{
b_planted = true;
g_c4timer = get_pcvar_num(pointnum);
dispTime()
set_task(1.0, "dispTime", 652450, "", 0, "b");
}

public bomb_defused()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public bomb_explode()
{
if(b_planted)
{
remove_task(652450);
b_planted = false;
}

}

public dispTime()
{
if(!b_planted)
{
remove_task(652450);
return;
}


if(g_c4timer >= 0)
{
if(g_c4timer > 13) {
set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}
else if(g_c4timer > 7) {
set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
if(g_c4timer == czas) {
client_cmd(0, "spk %s", "misc/bomb.wav")
}
}
else {
set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1);
}

ShowSyncHudMsg(0, g_msgsync, "C4: %d", g_c4timer);

--g_c4timer;
}

}

public plugin_precache()
{
precache_sound("misc/bomb.wav")

return PLUGIN_CONTINUE

}
grzelak is offline
fjollerik
Member
Join Date: Jul 2007
Location: Denmark
Old 01-23-2009 , 14:58   Re: C4 sound (planted bomb)
Reply With Quote #7

Hmm i cant get it working with my sound.. would you please try?

Heres the sound im trying with:
www.cs.yellowside.dk/TheHornOfCenarius.wav
fjollerik is offline
grzelak
Senior Member
Join Date: Sep 2008
Old 01-23-2009 , 15:11   Re: C4 sound (planted bomb)
Reply With Quote #8

Quote:
Originally Posted by fjollerik View Post
Hmm i cant get it working with my sound.. would you please try?

Heres the sound im trying with:
www.cs.yellowside.dk/TheHornOfCenarius.wav
Do u put it in "sound/misc" also this sound need to be called "bomb.wav"
grzelak is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 01-23-2009 , 19:04   Re: C4 sound (planted bomb)
Reply With Quote #9

test this

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>

#define PLUGIN "Bomb Sound"
#define VERSION "1.0"
#define AUTHOR "Starsailor"


forward bomb_planted(planter);



public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
}

public 
plugin_precache(){
    
precache_sound("misc/TheHornOfCenarius.wav")
}


public 
bomb_planted(id) {    
    new 
plantername[32]
    
get_user_name(id,plantername,31)
    
set_hudmessage(25500, -1.00.216.06.0)
    
show_hudmessage(0"%s has planted the bomb"plantername)
    
emit_sound(0,CHAN_AUTO,"misc/TheHornOfCenarius.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM);

Attached Files
File Type: sma Get Plugin or Get Source (bomb.sma - 2052 views - 652 Bytes)
__________________
Find my plugins here..

Ex - Spanish Moderator.
Starsailor is offline
fjollerik
Member
Join Date: Jul 2007
Location: Denmark
Old 01-22-2010 , 13:45   Re: C4 sound (planted bomb)
Reply With Quote #10

Hmm still not working^^
it shows me ive planted the bomb with a hudmessage yes.. but theres still the old "bomb has ben planted" sound
what am i doing wrong?
fjollerik is offline
Reply


Thread Tools
Display Modes

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 19:33.


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