Monthly Target: $400 Donations: $14
 3% 

[ZP] Extra Addon: Countdown NEW !


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MercedeSx7
Senior Member
Join Date: Feb 2012
Location: Serbia
Old 04-01-2012 , 15:12   [ZP] Extra Addon: Countdown NEW !
Reply With Quote #1

[ZP] Extra Addon: Countdown

Description

This will countdown until someone will turn into zombie.

To do list!

Go to zombieplague.cfg and find zp_delay 10 change to zp_delay 15.
( cstrike / addons / amxmodx / configs / zombieplague.cfg )

Changelog
Quote:
- Version: 1.0 (April 1 2012)
* Public release.
You need dhudmessage include file witch you can download
Here
Attached Files
File Type: sma Get Plugin or Get Source (zp_extra_addon_countdown.sma - 6513 views - 4.8 KB)
File Type: zip zombie_plague.zip (168.2 KB, 5836 views)
__________________

Last edited by MercedeSx7; 04-01-2012 at 15:24.
MercedeSx7 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 04-01-2012 , 15:44   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #2

Code:
set_task(0.1, "countdown")
There are your 5 sec so no need to change delay (:
__________________
H.RED.ZONE is offline
MercedeSx7
Senior Member
Join Date: Feb 2012
Location: Serbia
Old 04-01-2012 , 15:48   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #3

Quote:
Originally Posted by H.RED.ZONE View Post
Code:
set_task(0.1, "countdown")
There are your 5 sec so no need to change delay (:
I think its better 5.0 but ok
__________________
MercedeSx7 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 04-01-2012 , 16:00   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #4

Well task would start in 5.0 sec then they would need to change "zp_delay"
__________________
H.RED.ZONE is offline
MercedeSx7
Senior Member
Join Date: Feb 2012
Location: Serbia
Old 04-01-2012 , 16:09   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #5

Quote:
Originally Posted by H.RED.ZONE View Post
Well task would start in 5.0 sec then they would need to change "zp_delay"
Yes, i put it in the to do list (:
__________________

Last edited by MercedeSx7; 08-08-2012 at 13:13.
MercedeSx7 is offline
Gam3ronE
SourceMod Donor
Join Date: Aug 2010
Old 04-01-2012 , 17:24   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #6

Kind of you to share.
Gam3ronE is offline
MercedeSx7
Senior Member
Join Date: Feb 2012
Location: Serbia
Old 04-02-2012 , 08:21   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #7

Quote:
Originally Posted by Graham View Post
Kind of you to share.
Yea. ;)
__________________
MercedeSx7 is offline
Frozegrew
Member
Join Date: Sep 2011
Location: Belgrade, Serbia
Old 04-02-2012 , 14:29   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #8

Quote:
Originally Posted by MercedeSx7 View Post
Yes, i put it in the to do list (:

Ce me prihvatis na skype ?
Bogami, ponekad mi se čini da smo mi Srbi izuzetno velika nacija
__________________
Frozegrew is offline
Send a message via Skype™ to Frozegrew
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 04-02-2012 , 14:35   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #9

here is my version, its a very old code, used in darkness pain and darkangels3

PHP Code:

#include < amxmodx >
#include < amxmisc >
#include < dhudmessage >

#define MAX_SECONDS    11
#define MAX_SECONDS2   19

enum _iRGB
{
    
r,
    
g,
    
b
};

enum ( += 1337 )
{
    
TASK_ONE,
    
TASK_TWO,
    
TASK_THREE,
    
TASK_FOUR
};

new const 
gHudColorsMAX_SECONDS ][ iRGB ] =
{
    
//----------------------
    // Error countdown color

    
1590}, // 0

    // Error countdown color
    //----------------------



    // Countdown
    
2550249 }, // 1
    
0159159 }, // 2
    
0174147 }, // 3
    
0128128 }, // 4
    
55162162 }, // 5    
    
92199199 }, // 6
    
0159159 }, // 7
    
92199199 }, // 8
    
55162162 }, // 9
    
0159159 }  // 10 
};

new const 
gSoundsSpeakMAX_SECONDS ][ ] =
{
    
"Darkness7/countdown/one.wav"// 0
    
"Darkness7/countdown/one.wav"// 1
    
"Darkness7/countdown/two.wav"// 2
    
"Darkness7/countdown/three.wav"// 3
    
"Darkness7/countdown/four.wav"// 4
    
"Darkness7/countdown/five.wav"// 5
    
"Darkness7/countdown/six.wav"// 6
    
"Darkness7/countdown/seven.wav"// 7
    
"Darkness7/countdown/eight.wav"// 8
    
"Darkness7/countdown/nine.wav"// 9
    
"Darkness7/countdown/ten.wav" // 10
};

new 
gCountTimer;

public 
plugin_init( )
{
    
register_plugin"countdown""2.6""Dare-Devil" );
    
register_event("HLTV""event_round_start""a""1=0""2=0");
}

public 
plugin_precache( )
{
    new 
i;
    for( 
0MAX_SECONDSi++ )
    {
        
precache_soundgSoundsSpeak] );
    }
}

// Remove task, set tast
public event_round_start( )
{
    
// Remove Timer number ( fix bug )
    
gCountTimer 0;
    
    
remove_taskTASK_ONE );
    
remove_taskTASK_TWO );
    
remove_taskTASK_THREE );
    
remove_taskTASK_FOUR );
    
    
// Set Remove Task
    
set_taskfloatMAX_SECONDS2 ), "RemoveTasks2011"TASK_THREE__"b" );
    
    
// Set Countdown Task
    
set_task18.0"StartCountdown"TASK_FOUR__"a"MAX_SECONDS2 );
}

// Start Countdown task +1 sec
public StartCountdown( )
{
    
remove_taskTASK_ONE );
    
remove_taskTASK_TWO );
    
remove_taskTASK_THREE );
    
remove_taskTASK_FOUR );
    
    
set_taskfloatMAX_SECONDS ), "RemoveTimerHUD"TASK_ONE__"b" );
    
set_task1.0"ShowCountTimer"TASK_TWO__"a"MAX_SECONDS );
}

// Remove Countdown when infect round start
public zp_round_started()
{
    
remove_taskTASK_ONE );
    
remove_taskTASK_TWO );
    
remove_taskTASK_THREE );
    
remove_taskTASK_FOUR );
    
set_task1.0"RemoveTasks2011"TASK_THREE__"b" );
    
set_task1.0"RemoveTimerHUD"TASK_ONE__"b" );
    
    
// Remove Timer number ( fix bug )
    
gCountTimer 0;
}

// show countdown, play countdown sound
public ShowCountTimer( )
{
    
gCountTimer++;
    
    new 
iTimer MAX_SECONDS gCountTimer;
    
    
// set_dhudmessage( gHudColors[ iTimer ][ r ], gHudColors[ iTimer ][ g ], gHudColors[ iTimer ][ b ], -1.0, 0.28, 1, 0.0, 0.1, 0.2, 1.0); 
    // show_dhudmessage( 0, "%d", iTimer );
    
    
if (gCountTimer == 1)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 10 =-^n[*********°]"iTimer );
    }
    else if (
gCountTimer == 2)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 9 =-^n[********°°]"iTimer );
    }
    else if (
gCountTimer == 3)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 8 =-^n[*******°°°]"iTimer );
    }
    else if (
gCountTimer == 4)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 7 =-^n[******°°°°]"iTimer );
    }
    else if (
gCountTimer == 5)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 6 =-^n[*****°°°°°]"iTimer );
    }
    else if (
gCountTimer == 6)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 5 =-^n[****°°°°°°]"iTimer );
    }
    else if (
gCountTimer == 7)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 4 =-^n[***°°°°°°°]"iTimer );
    }
    else if (
gCountTimer == 8)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 3 =-^n[**°°°°°°°°]"iTimer );
    }
    else if (
gCountTimer == 9)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 2 =-^n[*°°°°°°°°°]"iTimer );
    }
    else if (
gCountTimer == 10)
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 1 =-^n[°°°°°°°°°°]"iTimer );
    }
    else
    {
        
set_dhudmessagegHudColorsiTimer ][ ], gHudColorsiTimer ][ ], gHudColorsiTimer ][ ], -1.00.2810.00.10.21.0); 
        
show_dhudmessage0"-= 0 =-^n[**********]"iTimer );
    }
    if( 
iTimer <= MAX_SECONDS )
    {
        new 
szNumToWord20 ];
        
num_to_wordiTimerszNumToWordcharsmaxszNumToWord ) );
        
        
client_cmd0"speak ^"Darkness7/countdown/%s^""szNumToWord );
    }
}

// remove hud task
public RemoveTimerHUD( )
{
    
remove_taskTASK_ONE );
    
remove_taskTASK_TWO );
    
gCountTimer 0;
}  

// remove hud task task
public RemoveTasks2011( )
{
    
remove_taskTASK_THREE );
    
remove_taskTASK_FOUR );
    


countdown stop when gameplay mode start, and you can make every count different text and color.

feel free to add a code in your post, then you need to change the sounds
that sounds dont exist on default cstrike/valve folder.
.Dare Devil. is offline
MercedeSx7
Senior Member
Join Date: Feb 2012
Location: Serbia
Old 04-03-2012 , 08:02   Re: [ZP] Extra Addon: Countdown NEW !
Reply With Quote #10

@.Dare Devil. ... Thanks
__________________
MercedeSx7 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 12:57.


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