Raised This Month: $51 Target: $400
 12% 

[Roundstart Sound]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-22-2010 , 20:56   [Roundstart Sound]
Reply With Quote #1

Can anyone link or code up that when a round starts, it plays a wav.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
stevenisecko138
Senior Member
Join Date: Dec 2008
Location: CA
Old 01-22-2010 , 21:31   Re: [Roundstart Sound]
Reply With Quote #2

here it goes
PHP Code:
#include <amxmodx>
 #include <amxmisc>

#define PLUGIN "Round start sound"
#define VERSION "1.0"
#define AUTHOR "EcKo"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("eventRoundend"2"1=Round_Start");

}
public 
eventRoundend()
{
    new 
rand random_num(0,2)

    
client_cmd(0,"stopsound")

    switch(
rand)
{
    case 
0client_cmd(0,"spk ER/spawn")
    }
}
public 
plugin_precache() 
{
  
precache_sound("ER/spawn.wav")

stevenisecko138 is offline
Send a message via AIM to stevenisecko138
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-22-2010 , 22:10   Re: [Roundstart Sound]
Reply With Quote #3

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

#define PLUGIN "Round start sound"
#define VERSION "1.0"
#define AUTHOR "EcKo"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("eventRoundend"2"1=Round_Start");

}
public 
eventRoundend()
{
    new 
rand random_num(0,2)

    
client_cmd(0,"stopsound")

    switch(
rand)
{
    case 
0client_cmd(0,"spk sicsounds/zombie_start")
    }
}
public 
plugin_precache() 
{
  
precache_sound("sicsounds/zombie_start.wav")

didn't work.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
stevenisecko138
Senior Member
Join Date: Dec 2008
Location: CA
Old 01-22-2010 , 22:12   Re: [Roundstart Sound]
Reply With Quote #4

Quote:
Originally Posted by stevenisecko138 View Post
here it goes
PHP Code:
#include <amxmodx>
#include <amxmisc> <---- missed the space

#define PLUGIN "Round start sound"
#define VERSION "1.0"
#define AUTHOR "EcKo"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_logevent("eventRoundend"2"1=Round_Start");

}
public 
eventRoundend()
{
    new 
rand random_num(0,2)

    
client_cmd(0,"stopsound")

    switch(
rand)
{
    case 
0client_cmd(0,"spk ER/spawn")
    }
}
public 
plugin_precache() 
{
  
precache_sound("ER/spawn.wav")

stevenisecko138 is offline
Send a message via AIM to stevenisecko138
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 01-22-2010 , 22:17   Re: [Roundstart Sound]
Reply With Quote #5

Why you need a random num?
Mxnn is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-22-2010 , 22:19   Re: [Roundstart Sound]
Reply With Quote #6

Doesn't play every round
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
worldspawn
Senior Member
Join Date: Aug 2009
Location: Russia, Yekaterinburg
Old 01-22-2010 , 23:54   Re: [Roundstart Sound]
Reply With Quote #7

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

public plugin_init() {
    
register_logevent("eventRoundend"2"1=Round_Start");
}

public 
eventRoundend()
{
    new 
numplayers[32],player
    get_players
(players,num,"ch")
    for(new 
i=0;i<num;i++)
    {
        
player players[i]
        
client_cmd(player,"spk sound.wav")
    }
}

public 
plugin_precache() 
{
    
precache_sound("sound.wav")

worldspawn is offline
Send a message via ICQ to worldspawn Send a message via Skype™ to worldspawn
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 01-23-2010 , 08:51   Re: [Roundstart Sound]
Reply With Quote #8

Got it to work already, thanks anyways.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
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 15:58.


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