Raised This Month: $ Target: $400
 0% 

Ambience


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grzelak
Senior Member
Join Date: Sep 2008
Old 01-21-2009 , 11:20   Ambience
Reply With Quote #1

Hi! Can someone change that plugin for work on zombie plague? Its biohazard plugin :

Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fakemeta_util>



new const ZOMBIE_AMBIENCE[] = "sound/grzelak/ambience.wav";


//Pcvars...
new zomb_ambience


public plugin_init() 
{
    zomb_ambience = register_cvar("zs_ambience", "1")

    set_task(1.0, "ambience_loop")
    
    
}

public plugin_precache() 
{

    engfunc(EngFunc_PrecacheSound, ZOMBIE_AMBIENCE);
    
}



public ambience_loop(id) 
{
    
    if (!get_pcvar_num(zomb_ambience))
    {
        set_task(5.0, "ambience_loop")
        return PLUGIN_HANDLED
    }
    
    client_cmd(0, "spk ^"%s^"", ZOMBIE_AMBIENCE)
    set_task(57.90, "ambience_loop")
    
    return PLUGIN_CONTINUE
}
grzelak is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 01-21-2009 , 17:01   Re: Ambience
Reply With Quote #2

You just have to adjust the main plugin and point it at a sound for ambience. The tutorials by Speed! should help, if not, then you can say something, maybe he will make one.
__________________
bmann_420 is offline
Speed!
BANNED
Join Date: Jan 2009
Old 01-22-2009 , 12:52   Re: Ambience
Reply With Quote #3

How can I get some background sounds to play?
First, uncomment its define like so:
PHP Code:
// Uncomment the following line to enable ambience sounds
#define AMBIENCE_SOUNDS 
Then add your sounds to the list and they'll be randomly looped during the game. Keep in mind to set their correct duration so they won't overlap each other.
PHP Code:
#if defined AMBIENCE_SOUNDS // Ambience Sounds List (only .wav and .mp3 formats supported)
// Infection Rounds
new const sound_ambience1[][] = { "zombie_plague/ambience1.wav""zombie_plague/ambience2.mp3" // sounds (played randomly)
new const Float:sound_ambience1_duration[] = { 15.0 30.0 // duration in seconds of each sound 
Speed! is offline
grzelak
Senior Member
Join Date: Sep 2008
Old 01-22-2009 , 14:08   Re: Ambience
Reply With Quote #4

Not working

Code:
#if defined AMBIENCE_SOUNDS // Ambience Sounds List (only .wav and .mp3 formats supported)
// Infection Rounds
new const sound_ambience1[][] = { "zombie_plague/grzelak/ambience.mp3" } // sounds (played randomly)
new const Float:sound_ambience1_duration[] = { 17.0 } // duration in seconds of each sound
// Nemesis Rounds
new const sound_ambience2[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience2_duration[] = { 17.0 }
// Survivor Rounds
new const sound_ambience3[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience3_duration[] = { 17.0 }
// Swarm Rounds
new const sound_ambience4[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience4_duration[] = { 17.0 }
// Plague Rounds
new const sound_ambience5[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience5_duration[] = { 17.0 }
#endif
grzelak is offline
Fry!
Veteran Member
Join Date: Apr 2008
Location: Latvia
Old 01-22-2009 , 14:25   Re: Ambience
Reply With Quote #5

That is zombie plague bug with ambience sounds...
__________________
Quote:
Originally Posted by wisam187
why all the great scriptors..... always.... leave and let their works go into oblivion ???
i miss your way in making outstanding plugins...
this forum needs lots of the likes of you..... and less of the idiots that spread right now.
Fry! is offline
Stixsmaster
Veteran Member
Join Date: May 2007
Location: I am all around you...I
Old 01-22-2009 , 19:57   Re: Ambience
Reply With Quote #6

Quote:
Originally Posted by grzelak View Post
Not working

Code:
#if defined AMBIENCE_SOUNDS // Ambience Sounds List (only .wav and .mp3 formats supported)
// Infection Rounds
new const sound_ambience1[][] = { "zombie_plague/grzelak/ambience.mp3" } // sounds (played randomly)
new const Float:sound_ambience1_duration[] = { 17.0 } // duration in seconds of each sound
// Nemesis Rounds
new const sound_ambience2[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience2_duration[] = { 17.0 }
// Survivor Rounds
new const sound_ambience3[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience3_duration[] = { 17.0 }
// Swarm Rounds
new const sound_ambience4[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience4_duration[] = { 17.0 }
// Plague Rounds
new const sound_ambience5[][] = { "zombie_plague/grzelak/ambience.mp3" }
new const Float:sound_ambience5_duration[] = { 17.0 }
#endif
Did you edit all that within the main ZP plugin or did you just add all that into a blank .sma and try to compile it?

I ask because from all your previous posts it seems like you are having much trouble reading the FAQ and the current content within the plugin...

---Stixsmaster
__________________
Stixsmaster is offline
Send a message via AIM to Stixsmaster Send a message via MSN to Stixsmaster
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 01-26-2009 , 15:34   Re: Ambience
Reply With Quote #7

If you can't get the built-in ZP ambience sounds system to work for any reason or if it doesn't satisfy your needs, you can make your own separate sub-plugin to play the sounds (and if needed, use the is_nemesis_round(), etc. natives for mode-specific themes).
__________________
MeRcyLeZZ 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 14:00.


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