AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] CSO Countdown 1.0 (Fixed) (https://forums.alliedmods.net/showthread.php?t=126158)

jc980 05-06-2010 07:32

[ZP] CSO Countdown 1.0 (Fixed)
 
2 Attachment(s)
[ZP] CSO Countdown (FIXED COMPLETELY)

Description:
Its a 2nd Remix of the Countdown Plugin, while I was playing with my version it was great,
the gameplay was just like CSO ZM3 so i posted this so every one can use it.

Make Sure Your Server's "zp_delay" is "20":
zp_delay 20

Improvements:
Added Starting Sound
20 delay until Infection
custom Sounds DOWNLOAD BELOW
10 seconds before chanting 10 - 1
client print center used instead of HUD message. (to Make it CSO Style)
Infect Notice
ML
Optimized

sincerely,
jc980

Updates:
Fixed the last sound file "one.wav" that was not emitting.
Fixed the Delayed Centered message.
Fixed Runtime Error on line 57.
Fixed The PLUGIN Completely

SMA: NEW FIXED VERSION
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <zombieplague>

#define VERSION "1.0"

new time_s
new const g_zm3_roundstart[][] = {"sound/cso/zombi_start.mp3"}
new const 
g_zm3_infectchant[][] = {"cso/zombi_coming_1_cn","cso/zombi_coming_2_cn"}
new const 
g_zm3_countchant[][] = { "cso/one.wav""cso/two.wav""cso/three.wav""cso/four.wav""cso/five.wav""cso/six.wav""cso/seven.wav""cso/eight.wav""cso/nine.wav""cso/ten.wav" }

public 
plugin_init() 
{
    
register_plugin("[CSO ZM3] - Zombie Countdown"VERSION"jc980, JeproKs Productions Team")
    
register_event("HLTV""event_round_start""a""1=0""2=0")
}

public 
plugin_precache()
{
    
register_dictionary("csozm3_countdown.txt")
    
    new 
iStartiChantiCount
    
    
for ( iStart 0iStart sizeof g_zm3_roundstartiStart++ )
    for ( 
iChant 0iChant sizeof g_zm3_infectchantiChant++ )
    for ( 
iCount 0iCount sizeof g_zm3_countchantiCount++ )
    
    
precache_sound g_zm3_roundstart iStart ] ) 
    
precache_sound g_zm3_infectchant iChant ] ) 
    
precache_sound g_zm3_countchant iCount ] ) 
}

public 
event_round_start()
{
    
csozm3_countdown()
    
time_s 20
}

public 
csozm3_countdown()
{       
    
client_cmd(0,"mp3 play %s",  g_zm3_roundstart)
    
client_print0print_center"%L""COUNTDOWN_NOTICE",time_s); 
    --
time_s;
    
    if(
time_s >= 1)
    {
        
set_task(1.0"csozm3_countdown")
    }
    
    if(
time_s == 10)
    {
        
emit_sound0CHAN_VOICEg_zm3_countchant[time_s 1], 1.0ATTN_NORM0PITCH_NORM )
    }
}  

public 
zp_user_infected_postidinfectornemesis )
{
    if ( !
infector || nemesis )
        return;
    
    if(
zp_get_user_first_zombie(id))
    {
        
client_print(0,print_center,"%L""FIRST_NOTICE",id)
        
emit_sound0CHAN_VOICEg_zm3_infectchant [random_num(1,2)], 1.0ATTN_NORM0PITCH_NORM )
    }
    else
    {
        
client_print(0,print_center,"%L""INFECTED_NOTICE",id,infector)
        
emit_sound0CHAN_VOICEg_zm3_infectchant [random_num(1,2)], 1.0ATTN_NORM0PITCH_NORM )
    }


Resources Download the Sounds please!

Russiaboy 05-06-2010 07:44

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
just rename some things man you suck delet this plugin !

albert123 05-06-2010 07:48

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
Don't rip code and post at here :| ?

jc980 05-06-2010 07:49

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
Quote:

Originally Posted by Russiaboy (Post 1172401)
just rename some things man you suck delet this plugin !

i did rename BUT I ADDED STUFF!

Quote:

Originally Posted by albert123 (Post 1172404)
Don't rip code and post at here :| ?

wha?

abdul-rehman 05-06-2010 08:22

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
So you just added support for 20 seconds ...

kenwelo 05-06-2010 08:23

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
you can add sound pack ? . from plugin

jc980 05-06-2010 08:28

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
Quote:

Originally Posted by abdul-rehman (Post 1172444)
So you just added support for 20 seconds ...

well not exactly, theres is a 20 sec delay but in that delay plays a sound or the start of the round after the sound fades away, the ghost will chant 10 - 1 and removed hud message replaced with print center.

Quote:

Originally Posted by kenwelo (Post 1172446)
you can add sound pack ? . from plugin

Omg here you go Sounds!!!!!

abdul-rehman 05-06-2010 08:31

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
Here are a few suggestiions:

1-
PHP Code:

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

Why the hell are you registering the same event twice with a different name...!!!!
just do it like this:
PHP Code:

public event_round_start()
{
   
time_s 20
   countdown 
9
 
   set_task
(0.1"csozm3_countdown")
   
set_task(10.0"csozm3_ghostchant")
 
   
server_cmd("spk %s"gs_CountdownSound)


2- Instead of this :
PHP Code:

emit_sound0CHAN_VOICEspeakcountdown ], 1.0ATTN_NORM0PITCH_NORM 

use this:
PHP Code:

client_cmd(0"spk %s"speak[countdown]) 

3- Instead of using a set_task for executing this:
PHP Code:

public event_round_start()
{
    
set_task(0.1"csozm3_countdown")
   .....


Directly execute the function like this:
PHP Code:

public event_round_start()
{
    
csozm3_countdown()
    ......


4- Add a cvar for whether it should be displayed as print_center or as a hud_message

georgik57 05-06-2010 08:45

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
i didn't try the plugin yet but from the description all i have to say is nice job

jc980 05-06-2010 08:48

Re: [ZP] CSO Countdown (Remix of original Countdown)
 
Quote:

Originally Posted by abdul-rehman (Post 1172456)
Here are a few suggestiions:

1-
PHP Code:

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

Why the hell are you registering the same event twice with a different name...!!!!
just do it like this:
PHP Code:

public event_round_start()
{
   
time_s 20
   countdown 
9
 
   set_task
(0.1"csozm3_countdown")
   
set_task(10.0"csozm3_ghostchant")
 
   
server_cmd("spk %s"gs_CountdownSound)


2- Instead of this :
PHP Code:

emit_sound0CHAN_VOICEspeakcountdown ], 1.0ATTN_NORM0PITCH_NORM 

use this:
PHP Code:

client_cmd(0"spk %s"speak[countdown]) 

3- Instead of using a set_task for executing this:
PHP Code:

public event_round_start()
{
    
set_task(0.1"csozm3_countdown")
   .....


Directly execute the function like this:
PHP Code:

public event_round_start()
{
    
csozm3_countdown()
    ......


4- Add a cvar for whether it should be displayed as print_center or as a hud_message

sorry! dont have to be bossy! and i splitted it because i want the song to play first then chanting!

Quote:

Originally Posted by georgik57 (Post 1172475)
i didn't try the plugin yet but from the description all i have to say is nice job

thank you!
___________________________________________

ok! ok! ok! ill re write it!


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

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