Raised This Month: $ Target: $400
 0% 

Custom c4 sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dxteam
Senior Member
Join Date: Dec 2005
Old 08-30-2007 , 16:09   Custom c4 sounds
Reply With Quote #1

Hi.
Make please someone this plugin:
Another c4 countdown sounds (20 seconds/10/9/8/7/6/5/4/3/2/1) - 11 new sounds
And all sounds are in sound/newc4timer
I would this plugin very much !!!
-------------------------------

I have one plugin but it doesn`t work:

Code:
#include <amxmodx> #include <csx> #define PLUGIN "CountDown custom sounds" #define VERSION "0.2" #define AUTHOR "Alka" //Thanks SAMURAI for base. new g_c4timer, pointnum; new bool:b_planted; new const count_30[] = "sound/custom30.wav"; new const count_20[] = "sound/custom20.wav"; stock const count_sounds[][] = {         "sound/custom1.wav",     "sound/custom2.wav",     "sound/custom3.wav",     "sound/custom4.wav",     "sound/custom5.wav",     "sound/custom6.wav",     "sound/custom7.wav",     "sound/custom8.wav",     "sound/custom9.wav",     "sound/custom10.wav" } 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_"); } 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);     PlaySound()     set_task(1.0, "PlaySound", 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 PlaySound() {       if(!b_planted)     {         remove_task(652450);         return;     }             if(g_c4timer >= 0)     {         switch(g_c4timer)         {             case 30: client_cmd(0, "spk %s", count_30);                             case 20: client_cmd(0, "spk %s", count_20);                             case 10: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 9: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 8: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 7: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 6: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 5: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 4: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 3: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 2: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                             case 1: client_cmd(0, "spk %s", count_sounds[g_c4timer]);                           }         --g_c4timer;     } }
Attached Files
File Type: sma Get Plugin or Get Source (custom_countdown_sounds.sma - 774 views - 2.3 KB)

Last edited by dxteam; 08-31-2007 at 16:31.
dxteam is offline
Send a message via ICQ to dxteam
dxteam
Senior Member
Join Date: Dec 2005
Old 08-31-2007 , 16:34   Re: Custom c4 sounds
Reply With Quote #2

Okey.
If you don`t know how to make it make please this:
If bomb has been planted play 1 sound in wav format.
Like in this plugin
Code:
#include <amxmodx> #include <fakemeta> #define TREE "models/c14-cristmastree.mdl" new rep_Planted[] = "sound/JingleBell.wav"; new rep_Defused[] = "sound/Laugh.wav"; new game_Planted[5][] = {       "weapons/c4_beep1.wav",     "weapons/c4_beep2.wav",     "weapons/c4_beep3.wav",     "weapons/c4_beep4.wav",     "weapons/c4_beep5.wav" }; new game_Defused[] = "weapons/c4_disarm.wav"; public plugin_init() {     register_plugin("C4 Tree","0.10","Avalanche");     register_forward(FM_SetModel,"fw_setmodel");     //sounds added by Rolnaaba     register_forward(FM_EmitSound, "fw_replace_sound"); } public plugin_precache() {     precache_model(TREE);     precache_sound("JingleBell.wav")     precache_sound("Laugh.wav") } public fw_setmodel(ent,model[]) {     if(equali(model,"models/w_c4.mdl"))     {         engfunc(EngFunc_SetModel,ent,TREE);         return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; } //sounds added by Rolnaaba public fw_replace_sound(ent, channel, const sound[], Float:volume,Float:attenuation, flags, pitch) {     if(equali(sound, game_Defused)) {         engfunc(EngFunc_EmitSound,ent,channel,rep_Defused,volume,attenuation,flags,pitch);         return FMRES_SUPERCEDE;     }     else {         new listsize = sizeof game_Planted;                 for(new i; i<listsize; i++) {             if(equali(sound, game_Planted[i])) {                 engfunc(EngFunc_EmitSound,ent,channel,rep_Planted,volume,attenuation,flags,pitch);                 return FMRES_SUPERCEDE;             }         }     }     return FMRES_IGNORED; }

But this plugin doesn`t work !
Correct please 1st or second plugin.
Attached Files
File Type: sma Get Plugin or Get Source (Christmas_Bomb.sma - 770 views - 1.6 KB)
dxteam is offline
Send a message via ICQ to dxteam
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 16:11.


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