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

[Request] C4 Timer + custom sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thekiller123
Member
Join Date: Dec 2012
Old 08-31-2016 , 20:46   [Request] C4 Timer + custom sound
Reply With Quote #1

I want the plugin, c4 timer + custom sounds with this following numbers 30,20,10,9,8,7,6,5,4,3,2,1

If until explode remains less than 10 seconds, hudmessage color will be red, if 20 seconds will be yellow and 35 will be green.

Thank you for your help.

Last edited by thekiller123; 08-31-2016 at 20:51.
thekiller123 is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 08-31-2016 , 21:53   Re: [Request] C4 Timer + custom sound
Reply With Quote #2

Something like this?

https://forums.alliedmods.net/showthread.php?t=278600
safetymoose is offline
thekiller123
Member
Join Date: Dec 2012
Old 09-01-2016 , 12:27   Re: [Request] C4 Timer + custom sound
Reply With Quote #3

this does not have custom sounds.
thekiller123 is offline
7thSense
Member
Join Date: Jul 2016
Old 09-01-2016 , 13:16   Re: [Request] C4 Timer + custom sound
Reply With Quote #4

PHP Code:
#include <amxmodx>  
#include <cstrike> 
#include <csx>  
#include <dhudmessage>

new const PLUGIN[] = "C4 Plugin"  
new const VERSION[] = "1.1b"  
new const AUTHOR[] = "Xvil"  

new g_Cvarg_C4

// register the cvar and the plugin  
public plugin_init() {  
    
register_plugin(PLUGINVERSIONAUTHOR)  
    
g_C4 get_cvar_pointer("mp_c4timer")
    
g_Cvar register_cvar("bm_enabled""1"// amx_cvar bm_enabled 1 = ON || amx_cvar bm_enabled 0 = OFF  
    
register_logevent("RoundEnd",2,"1=Round_End")    
    
register_logevent("logevent_round_start"2"1=Round_Start")    
      
}  
// plugin precache  
public plugin_precache() { 
    
precache_sound("misc/ten.wav")   
    
precache_sound("misc/nine.wav")  
    
precache_sound("misc/eight.wav")  
    
precache_sound("misc/seven.wav")  
    
precache_sound("misc/six.wav")  
    
precache_sound("misc/five.wav")  
    
precache_sound("misc/foor.wav")  
    
precache_sound("misc/three.wav")  
    
precache_sound("misc/two.wav")  
    
precache_sound("misc/one.wav")  
    
precache_sound("radio/bot/good_job_team.wav")  
    
precache_sound("radio/bot/defusing_bomb.wav")  
    
precache_sound("radio/bot/im_gonna_go_plant.wav")  
    
precache_sound("radio/bot/im_gonna_go_plant_the_bomb.wav")  
    
precache_sound("radio/bot/defusing.wav")  
    
precache_sound("radio/bot/defusing_bomb_now.wav")  
    
precache_sound("radio/bot/good_one_sir.wav")  
    
precache_sound("radio/bot/good_one_sir2.wav")  
      
    return 
PLUGIN_HANDLED  
}  

public 
bomb_planting(planter) {  
      
    new 
PLname[32]  
    new 
randim random_num(0,1)  
      
    if(!
get_pcvar_num(g_Cvar))  
        return 
PLUGIN_CONTINUE  
          
    get_user_name
(planterPLname31)  
    
set_hudmessage(00255, -1.0, -1.002.01.0)  
    
show_hudmessage(0"%s is planting The bomb"PLname)  
      
    switch(
randim)  
  {  
    case 
0client_cmd(0,"spk radio/bot/im_gonna_go_plant_the_bomb.wav")  
    case 
1client_cmd(0,"spk radio/bot/im_gonna_go_plant.wav")  
  }  
      
    return 
PLUGIN_HANDLED  
      
}  
// called when the bomb is planted  
public bomb_planted(planter) {  
    new 
Name[32]
      
    if(!
get_pcvar_num(g_Cvar))  
        return 
PLUGIN_CONTINUE  
          
    get_user_name
(planterName31)  
      
    
set_dhudmessage(255,255,255,-1.0,-1.0,1,0.3,1.0)  
    
show_dhudmessage(0"Bomb has been planted from %s"Name)  
    
    
      
     
    new 
time get_pcvar_num(g_C4)
    
    
float(time)
    
     
    
// task for the 10 end C4 timer 
    
set_task( (time 10.0) , "Zero"0)    
    
set_task( (time 9.0) , "one"0)  
    
set_task( (time 8.0) , "two"0)  
    
set_task( (time 7.0) , "three"0)  
    
set_task( (time 6.0) , "foor"0)  
    
set_task( (time 5.0) , "five"0)  
    
set_task( (time 4.0) , "six"0); 
    
set_task( (time 3.0) , "seven"0)  
    
set_task( (time 2.0) , "eigth"0)  
    
set_task( (time 1.0) , "nine"0)  
    return 
PLUGIN_CONTINUE  
}  

public 
Zero()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"10")  
    
client_cmd(0"spk misc/ten.wav" )  
    return 
PLUGIN_CONTINUE  
}  

public 
one()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"9")  
    
client_cmd(0"spk misc/nine.wav" )  
    return 
PLUGIN_CONTINUE  
}  
public 
two()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"8")  
    
client_cmd(0"spk misc/eight.wav")  
    return 
PLUGIN_CONTINUE  
}  
public 
three()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"7")  
    
client_cmd(0"spk misc/seven.wav")  
    return 
PLUGIN_CONTINUE  
}  
public 
foor()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"6")  
    
client_cmd(0"spk misc/six.wav"  )  
    return 
PLUGIN_CONTINUE  
}  
public 
five()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"5")  
    
client_cmd(0"spk misc/five.wav" )  
    return 
PLUGIN_CONTINUE  
}  
public 
six()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"4")  
    
client_cmd(0"spk misc/foor.wav" )  
    return 
PLUGIN_CONTINUE  
}  
public 
seven()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"3")  
    
client_cmd(0"spk misc/three.wav")  
    return 
PLUGIN_CONTINUE  
}  
public 
eigth()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"2")  
    
client_cmd(0"spk misc/two.wav"  )  
    return 
PLUGIN_CONTINUE  
}  
public 
nine()  
{  
    
set_hudmessage(25500, -1.00.1700.91.0)  
    
show_hudmessage(0"1")  
    
client_cmd(0"spk misc/one.wav")  
    return 
PLUGIN_CONTINUE  
}  
// called when the C4 explode  
public bomb_explode(planterdefuser) {  
    new 
PName[32]  
    new 
randam random_num(0,2)  
      
    if(!
get_pcvar_num(g_Cvar))  
        return 
PLUGIN_CONTINUE  
          
    remove_task
(0,0)  
      
    
get_user_name(planterPName31)  
    
set_dhudmessage(255255,255, -1.00.1710.91.0)  
    
show_dhudmessage(0"Bomb Explode! Good Job %s"PName)  
    switch(
randam)  
  {  
    case 
0client_cmd(0,"spk radio/bot/good_one_sir2.wav")  
    case 
1client_cmd(0,"spk radio/bot/good_job_team.wav")  
    case 
2client_cmd(0,"spk radio/bot/good_one_sir.wav")  
  }  
      
    return 
PLUGIN_HANDLED  
}  
// called when the defuser is defusing the bomb  
public bomb_defusing(defuser) {  
    new 
DName[32];  
    new 
rando random_num(0,2)  
      
    if(!
get_pcvar_num(g_Cvar))  
        return 
PLUGIN_CONTINUE  
      
    get_user_name
(defuserDName31)  
    
set_dhudmessage(255255255, -1.0, -1.002.01.0)  
    
show_dhudmessage(0"%s is Defusing The bomb"DName)  
    switch(
rando)  
  {  
    case 
0client_cmd(0,"spk radio/bot/defusing_bomb.wav")  
    case 
1client_cmd(0,"spk radio/bot/defusing.wav")  
    case 
2client_cmd(0,"spk radio/bot/defusing_bomb_now.wav")  
  }  
    return 
PLUGIN_CONTINUE  
}  
// called when the defuser complete  
public bomb_defused(defuser) {  
    new 
DefName[32]  
    new 
randem random_num(0,2)  
      
    if(!
get_pcvar_num(g_Cvar))  
        return 
PLUGIN_CONTINUE  
          
    remove_task
(0,0)  
      
    
get_user_name(defuserDefName31)  
      
    
set_dhudmessage(02550, -1.0, -1.006.012.0)  
    
show_dhudmessage(defuser"Bomb Defused! Good Job %s"DefName)  
      
    switch(
randem)  
  {  
    case 
0client_cmd(0,"spk radio/bot/good_one_sir2.wav")  
    case 
1client_cmd(0,"spk radio/bot/good_job_team.wav")  
    case 
2client_cmd(0,"spk radio/bot/good_one_sir.wav")  
  }  
    return 
PLUGIN_HANDLED  
}  


public 
RoundEnd()  
{  
    
remove_task(0,0)  
}  


public 
logevent_round_star()  
{  
    
remove_task(0,0)  

here.
7thSense 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 23:27.


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