Raised This Month: $ Target: $400
 0% 

Zp Countdown


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fshiju
Member
Join Date: Dec 2010
Location: Bosnia & Herzegovina
Old 01-19-2012 , 04:42   Zp Countdown
Reply With Quote #1

can someone help with this error

L 01/19/2012 - 073:46: [AMXX] Displaying debug trace (plugin "zp_countdown.amxx")
L 01/19/2012 - 073:46: [AMXX] Run time error 4: index out of bounds
L 01/19/2012 - 073:46: [AMXX] [0] zp_countdown.sma::zombie_countdown (line 42)

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"fvox/ten.wav" )
    
precache_sound"fvox/nine.wav" )
    
precache_sound"fvox/eight.wav" )
    
precache_sound"fvox/seven.wav" )
    
precache_sound"fvox/six.wav" )
    
precache_sound"fvox/five.wav" )
    
precache_sound"fvox/four.wav" )
    
precache_sound"fvox/three.wav" )
    
precache_sound"fvox/two.wav" )
    
precache_sound"fvox/one.wav" )
}

public 
event_round_start()
{
    
set_task(4.0"zombie_countdown")
    
time_s 10
    countdown 
9
}

public 
zombie_countdown()
{    
    new 
speak10 ][] = { "fvox/one.wav""fvox/two.wav""fvox/three.wav""fvox/four.wav""fvox/five.wav""fvox/six.wav""fvox/seven.wav""fvox/eight.wav""fvox/nine.wav""fvox/ten.wav" }

    
emit_sound0CHAN_VOICEspeakcountdown ], 1.0ATTN_NORM0PITCH_NORM )
    
countdown--
        
    
set_hudmessage(17900, -1.00.2820.021.00.010.110); 
    
show_hudmessage(0"%i"time_s); 
    --
time_s;
        
    if(
time_s >= 1)
    {
        
set_task(1.0"zombie_countdown")
    }

fshiju is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 01-19-2012 , 05:44   Re: Zp Countdown
Reply With Quote #2

Can you show your cvar "zp_delay" please
__________________
Snaker beatter is offline
fshiju
Member
Join Date: Dec 2010
Location: Bosnia & Herzegovina
Old 01-19-2012 , 11:18   Re: Zp Countdown
Reply With Quote #3

zp_delay 14

and could u make it so the client who enter my serv download this sound ?

Last edited by fshiju; 01-19-2012 at 12:50.
fshiju is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 01-19-2012 , 20:37   Re: Zp Countdown
Reply With Quote #4

Quote:
Originally Posted by fshiju View Post
zp_delay 14

and could u make it so the client who enter my serv download this sound ?
Now thats the problem. In that plugin you need to set that cvar to this:

zp_delay 10
__________________
Snaker beatter is offline
fshiju
Member
Join Date: Dec 2010
Location: Bosnia & Herzegovina
Old 01-20-2012 , 04:43   Re: Zp Countdown
Reply With Quote #5

it dont work properly on zp_dealy 10 infection happens on countdown #4
fshiju is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 01-20-2012 , 10:16   Re: Zp Countdown
Reply With Quote #6

zp_delay 10 is the only way to make count-down work
__________________
Snaker beatter is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 01-20-2012 , 10:31   Re: Zp Countdown
Reply With Quote #7

nope snaker he can edit
set_task
(1.0, "zombie_countdown")
__________________
H.RED.ZONE is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 01-20-2012 , 10:34   Re: Zp Countdown
Reply With Quote #8

Owh he means you have to wait 4 seconds to make count-down work.

And its right

1. zp_delay 10 should always active

2. set_task(4.0, "zombie_countdown") to set_task(1.0, "zombie_countdown")
__________________
Snaker beatter is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 01-20-2012 , 11:09   Re: Zp Countdown
Reply With Quote #9

Quote:
Originally Posted by Snaker beatter View Post
Owh he means you have to wait 4 seconds to make count-down work.

And its right

1. zp_delay 10 should always active

2. set_task(4.0, "zombie_countdown") to set_task(1.0, "zombie_countdown")
yep that's what i sad.
__________________
H.RED.ZONE is offline
fshiju
Member
Join Date: Dec 2010
Location: Bosnia & Herzegovina
Old 01-20-2012 , 13:02   Re: Zp Countdown
Reply With Quote #10

ok fixed that but can u make that the client has to download this sound from plugin?

precache_sound( "fvox/ten.wav" )
precache_sound( "fvox/nine.wav" )
precache_sound( "fvox/eight.wav" )
precache_sound( "fvox/seven.wav" )
precache_sound( "fvox/six.wav" )
precache_sound( "fvox/five.wav" )
precache_sound( "fvox/four.wav" )
precache_sound( "fvox/three.wav" )
precache_sound( "fvox/two.wav" )
precache_sound( "fvox/one.wav" )
fshiju is offline
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 20:50.


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