AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   [ZP] Extra Addon: Countdown NEW ! (https://forums.alliedmods.net/showthread.php?t=181752)

MercedeSx7 04-01-2012 15:12

[ZP] Extra Addon: Countdown NEW !
 
2 Attachment(s)
[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

H.RED.ZONE 04-01-2012 15:44

Re: [ZP] Extra Addon: Countdown NEW !
 
Code:

set_task(0.1, "countdown")
There are your 5 sec so no need to change delay (:

MercedeSx7 04-01-2012 15:48

Re: [ZP] Extra Addon: Countdown NEW !
 
Quote:

Originally Posted by H.RED.ZONE (Post 1680089)
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 :)

H.RED.ZONE 04-01-2012 16:00

Re: [ZP] Extra Addon: Countdown NEW !
 
Well task would start in 5.0 sec then they would need to change "zp_delay"

MercedeSx7 04-01-2012 16:09

Re: [ZP] Extra Addon: Countdown NEW !
 
Quote:

Originally Posted by H.RED.ZONE (Post 1680118)
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 (:

Gam3ronE 04-01-2012 17:24

Re: [ZP] Extra Addon: Countdown NEW !
 
Kind of you to share. :)

MercedeSx7 04-02-2012 08:21

Re: [ZP] Extra Addon: Countdown NEW !
 
Quote:

Originally Posted by Graham (Post 1680203)
Kind of you to share. :)

Yea. ;)

Frozegrew 04-02-2012 14:29

Re: [ZP] Extra Addon: Countdown NEW !
 
Quote:

Originally Posted by MercedeSx7 (Post 1680130)
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 :)

.Dare Devil. 04-02-2012 14:35

Re: [ZP] Extra Addon: Countdown NEW !
 
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.

MercedeSx7 04-03-2012 08:02

Re: [ZP] Extra Addon: Countdown NEW !
 
@.Dare Devil. ... Thanks :D


All times are GMT -4. The time now is 15:27.

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