Raised This Month: $ Target: $400
 0% 

zp adons countdown


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BLANCIKJOINT_
Member
Join Date: Oct 2013
Old 10-02-2014 , 05:59   zp adons countdown
Reply With Quote #1

L 10/02/2014 - 11:50:05: [AMXX] Displaying debug trace (plugin "zp_countdown.amxx")
L 10/02/2014 - 11:50:05: [AMXX] Run time error 4: index out of bounds
L 10/02/2014 - 11:50:05: [AMXX] [0] zp_countdown.sma::zombie_countdown (line 85)
Attached Files
File Type: sma Get Plugin or Get Source (zp_countdown.sma - 456 views - 1.6 KB)
BLANCIKJOINT_ is offline
bat
Veteran Member
Join Date: Jul 2012
Old 10-02-2014 , 06:08   Re: zp adons countdown
Reply With Quote #2

PHP Code:
#include <amxmodx>

#include <amxmisc>

//#include <zombieplague>



#define PLUGIN "[ZP] Countdown"

#define VERSION "1.0"

#define AUTHOR "Mr.Apple"



new countdown

new time_s



public plugin_init() 

{

    
register_plugin(PLUGINVERSIONAUTHOR)

    
register_event("HLTV""event_round_start""a""1=0""2=0")

}



public 
plugin_precache()

{

    
precache_sound"zombie_plague/ten.wav" )

    
precache_sound"zombie_plague/nine.wav" )

    
precache_sound"zombie_plague/eight.wav" )

    
precache_sound"zombie_plague/seven.wav" )

    
precache_sound"zombie_plague/six.wav" )

    
precache_sound"zombie_plague/five.wav" )

    
precache_sound"zombie_plague/four.wav" )

    
precache_sound"zombie_plague/three.wav" )

    
precache_sound"zombie_plague/two.wav" )

    
precache_sound"zombie_plague/one.wav" )

}



public 
event_round_start()

{

    
set_task(4.0"zombie_countdown")

    
time_s 10

    countdown 
9

}



public 
zombie_countdown()

{

   if(
time_s 0)
   {
    new 
speak10 ][] = { "zombie_plague/one.wav""zombie_plague/two.wav""zombie_plague/three.wav""zombie_plague/four.wav""zombie_plague/five.wav""zombie_plague/six.wav""zombie_plague/seven.wav""zombie_plague/eight.wav""zombie_plague/nine.wav""zombie_plague/ten.wav" }


     if(
time_s 11)
     {
    
emit_sound0CHAN_VOICEspeakcountdown ], 1.0ATTN_NORM0PITCH_NORM )

    
countdown--

        

    
set_hudmessage(17900, -1.00.2820.021.00.010.110);

    
show_hudmessage(0"Infekcja rozpocznie sie za %i"time_s);

    --
time_s;
     }
  }

    



    if(
time_s >= 1)

    {

        
set_task(1.0"zombie_countdown")

    }


__________________
bat is offline
Send a message via Skype™ to bat
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 17:38.


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