Raised This Month: $ Target: $400
 0% 

Ambience music


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
s3r
Senior Member
Join Date: Aug 2007
Old 01-21-2008 , 23:50   Ambience music
Reply With Quote #1

I have changed the zombie_swarm v2.5 ambience to q3 music. When i enter the game everything is good and the music is playging but in few seconds music starts playing dublicated, the same music starts playing again when the music is not ended wth? music formated to pcm format
ps ive been hit in support theard so posting here
__________________
PS srr 4 strange enlish
s3r is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 01-22-2008 , 17:35   Re: Ambience music
Reply With Quote #2

Modify the set task in the ambience function to the music's length
__________________
Hunter-Digital is offline
s3r
Senior Member
Join Date: Aug 2007
Old 01-23-2008 , 08:22   Re: Ambience music
Reply With Quote #3

I dont know what i need to change there
Here is the sma file show me what to change there and the songs lenght is 39sec
Attached Files
File Type: sma Get Plugin or Get Source (zombie_swarm.sma - 745 views - 29.6 KB)
__________________
PS srr 4 strange enlish
s3r is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 01-23-2008 , 09:16   Re: Ambience music
Reply With Quote #4

Uh, just find this:
PHP Code:
public ambience_loop(id
{
if(!
get_pcvar_num(zomb_switch))
return 
PLUGIN_HANDLED

if (!get_pcvar_num(zomb_ambience))
{
set_task(5.0"ambience_loop")
return 
PLUGIN_HANDLED
}

client_cmd(0"spk ^"%s^""ZOMBIE_AMBIENCE)
set_task(17.0"ambience_loop")

return 
PLUGIN_CONTINUE

and replace with this:

PHP Code:
public ambience_loop(id
{
if(!
get_pcvar_num(zomb_switch))
return 
PLUGIN_HANDLED

if (!get_pcvar_num(zomb_ambience))
{
set_task(5.0"ambience_loop")
return 
PLUGIN_HANDLED
}

client_cmd(0"spk ^"%s^""ZOMBIE_AMBIENCE)
set_task(39.0"ambience_loop")

return 
PLUGIN_CONTINUE

I just modified the set_task(17.0 to set_task(39.0 ... but, to be absolutly accurate, are you sure it's 39 ? not 39.5 or something ? cause it matters if it is, just replace

enjoy.
__________________
Hunter-Digital is offline
s3r
Senior Member
Join Date: Aug 2007
Old 01-23-2008 , 09:54   Re: Ambience music
Reply With Quote #5

oh now i will know ty +karma ;d
__________________
PS srr 4 strange enlish
s3r 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:28.


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