Raised This Month: $ Target: $400
 0% 

[ZP] Countdown


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Watermelonnable
Member
Join Date: Feb 2017
Old 12-10-2019 , 10:19   Re: [ZP] Countdown
Reply With Quote #8

Quote:
Originally Posted by StarMpK View Post
Yeah well you forgot to make the last hud message to last 3 seconds
Try this one:

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Plugin Name"
#define VERSION "1.0"
#define AUTHOR "Plugin Author"

new g_CurrentSecond;

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_event("HLTV""event_round_start""a""1=0""2=0");
    
g_CurrentSecond 10;
}

public 
plugin_precache() 
{
    new 
precacheString[32];

    for (new 
011i++) {
        
formatex(precacheStringcharsmax(precacheString), "zombie_plague/%d.wav"i);
        
precache_sound(precacheString);
    }
}

public 
event_round_start() 
{
    
set_task(5.0"Countdown");
}

public 
Countdown() 
{
    
set_task(1.0"RealCountdown"0""0"a"11);
}

public 
RealCountdown()
{
    new 
hudMessage[32];
    new 
playSoundString[32];

    if (
g_CurrentSecond == 0) {
       
formatex(hudMessagecharsmax(hudMessage), "Humans get Ready !^nThe Fight Starts Now!"); 
       
set_hudmessage(25500, -1.00.2820.023.00.010.110);
    } else {
        
formatex(hudMessagecharsmax(hudMessage), "-= %d =-^n[**********]"g_CurrentSecond);
        
set_hudmessage(0180255, -1.00.2820.021.00.010.110);
    }
    
    
formatex(playSoundStringcharsmax(playSoundString), "spk zombie_plague/%d"g_CurrentSecond);
    
client_cmd(0playSoundString);
    
show_hudmessage(0hudMessage);
    
g_CurrentSecond--;


Last edited by Watermelonnable; 12-10-2019 at 10:19.
Watermelonnable is offline
 



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 18:03.


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