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

C4 timer and Sound


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
kwpd
AlliedModders Donor
Join Date: Mar 2009
Location: panama
Old 03-16-2012 , 01:50   C4 timer and Sound
Reply With Quote #1

C4 timer and Sound

Original plugin:

Xvil = C4 Plugin - http://forums.alliedmods.net/showthread.php?t=179547
Cheap_Suit = C4 Timer - http://forums.alliedmods.net/showthread.php?p=483666

Modules:
Amx Mod X
cstrike

Description:
C4 plant when a player will show the time and the horn sound of explosion.

Cvars:
amx_showc4timer <0|1|3> - Off | T's only | CT's only | ALL (Default: 3)
amx_showc4flash <0|1> - Sprite flashing (Default: 0)
amx_showc4sprite <0|1> - Choose from 2 sprites (Default: 1)
amx_showc4msg <0|1> - Shows a hud message about the timer (Default: 0)
amx_soundc4
<0|1> -Sound Exploting (Default: 1)

Changelog:
Code:
Version 1.6
* Control+i

Version 1.5
* Fix remove_task
* Fix enable/disable sound
* Change sound Female

Version 1.4
* Fix SoundC4 RoundStart

Version 1.3 
* Fix Duplicated mp_c4timer

Version 1.2 
* Define ID set_task

Version 1.1 
* Fix show time
* Fix RoundStart
* Remover csx

Version 1.0
* Initial Release
Install:
sound ==> cstrike/
C4timer.amxx ==> cstrike/amxmodx/plugins/
Write
C4timer.amxx in cstrike/addons/amxmodx/config/plugins.ini


Attached Files
File Type: zip sound.zip (62.8 KB, 6661 views)
File Type: sma Get Plugin or Get Source (C4timer.sma - 7809 views - 6.2 KB)
__________________

Last edited by kwpd; 01-13-2013 at 05:09.
kwpd is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 03-16-2012 , 02:50   Re: C4 timer and Sound
Reply With Quote #2

use one task and set the flag to "b", you should remove the task when round end !
use a global array to store the sound file, the you can use it in the plugin_precache also the task same !
register the BarTime event can hook when the bomb being planted !
so you don't need to use the csx module !
I think there are more to be fixed !
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
kwpd
AlliedModders Donor
Join Date: Mar 2009
Location: panama
Old 03-16-2012 , 03:31   Re: C4 timer and Sound
Reply With Quote #3

remove the task when round end?

PHP Code:
public RoundEnd()
{
    
remove_task(0,0)

__________________
kwpd is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 03-16-2012 , 04:30   Re: C4 timer and Sound
Reply With Quote #4

Yeah !
but you need to define a task ID, then you can use it !
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Xvil
BANNED
Join Date: Feb 2012
Old 03-16-2012 , 04:34   Re: C4 timer and Sound
Reply With Quote #5

Good Job!

Last edited by Xvil; 03-16-2012 at 04:35.
Xvil is offline
Xvil
BANNED
Join Date: Feb 2012
Old 03-16-2012 , 04:49   Re: C4 timer and Sound
Reply With Quote #6

Quote:
Originally Posted by kwpd View Post
remove the task when round end?

PHP Code:
public RoundEnd()
{
    
remove_task(0,0)

Add RoundStart Remove task Because i'm not shure that the round will be end if it's restarted
Xvil is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 03-16-2012 , 05:42   Re: C4 timer and Sound
Reply With Quote #7

Screenshot for hud timer, please?
Lolz0r is offline
kwpd
AlliedModders Donor
Join Date: Mar 2009
Location: panama
Old 03-16-2012 , 06:06   Re: C4 timer and Sound
Reply With Quote #8

PHP Code:
#define task_sound 69696969 
PHP Code:
    set_task( (time 10.0) , "Zero"task_sound)
    
set_task( (time 9.0) , "one"task_sound)
    
set_task( (time 8.0) , "two"task_sound)
    
set_task( (time 7.0) , "three"task_sound)
    
set_task( (time 6.0) , "foor"task_sound)
    
set_task( (time 5.0) , "five"task_sound)
    
set_task( (time 4.0) , "six"task_sound)
    
set_task( (time 3.0) , "seven"task_sound)
    
set_task( (time 2.0) , "eigth"task_sound)
    
set_task( (time 1.0) , "nine"task_sound
PHP Code:
public RoundEnd()
{
    
remove_task(task_sound)

something like this. so you do not finalize set_task in another plugin?
__________________

Last edited by kwpd; 03-16-2012 at 06:31.
kwpd is offline
Xvil
BANNED
Join Date: Feb 2012
Old 03-16-2012 , 07:53   Re: C4 timer and Sound
Reply With Quote #9

Why Did you add 2 Pointers for one cvar?

PHP Code:
mp_c4timer get_cvar_pointer("mp_c4timer")
g_C4 get_cvar_pointer("mp_c4timer"
Change it to a one Pointer.

PHP Code:
g_C4 get_cvar_pointer("mp_c4timer"

Last edited by Xvil; 03-16-2012 at 08:04.
Xvil is offline
BrownBear
Member
Join Date: May 2011
Location: Malaysia
Old 03-16-2012 , 10:39   Re: C4 timer and Sound
Reply With Quote #10

I tot this plugin is already made by someone else?
__________________
BrownBear 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 05:12.


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