AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   C4 timer and Sound (https://forums.alliedmods.net/showthread.php?t=180459)

kwpd 03-16-2012 01:50

C4 timer and Sound
 
2 Attachment(s)
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

http://i.imgur.com/eZqHH.jpg

K.K.Lv 03-16-2012 02:50

Re: C4 timer and Sound
 
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 ! :)

kwpd 03-16-2012 03:31

Re: C4 timer and Sound
 
remove the task when round end?

PHP Code:

public RoundEnd()
{
    
remove_task(0,0)



K.K.Lv 03-16-2012 04:30

Re: C4 timer and Sound
 
Yeah !
but you need to define a task ID, then you can use it !

Xvil 03-16-2012 04:34

Re: C4 timer and Sound
 
Good Job! :up:

Xvil 03-16-2012 04:49

Re: C4 timer and Sound
 
Quote:

Originally Posted by kwpd (Post 1669777)
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

Lolz0r 03-16-2012 05:42

Re: C4 timer and Sound
 
Screenshot for hud timer, please? :)

kwpd 03-16-2012 06:06

Re: C4 timer and Sound
 
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?

Xvil 03-16-2012 07:53

Re: C4 timer and Sound
 
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"


BrownBear 03-16-2012 10:39

Re: C4 timer and Sound
 
I tot this plugin is already made by someone else? :shock:


All times are GMT -4. The time now is 20:11.

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