Raised This Month: $ Target: $400
 0% 

Ambience sound xyz rounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pewex
Senior Member
Join Date: Dec 2010
Location: AlliedMods
Old 12-29-2012 , 15:26   Ambience sound xyz rounds
Reply With Quote #1

Hello, i have this plugin:

Code:

#include <amxmodx>
    
new const AmbienSound[] = "zombie_plague/round_start5.wav";

public plugin_precache () 
{
    precache_sound( AmbienSound );
}

public plugin_init () 
{
    register_plugin( "Ambience Sound", "0.1",  "DeeKeiD" );
    register_logevent( "OnRoundStart", 2, "1=Round_Start" );
}

public OnRoundStart()
{
    client_cmd( 0, "spk %s", AmbienSound );
}  
How to edit this plugin, so:

  • plugin played, ambience sound only: ONE ROUND on map (RANDOM ROUND).
Please edit

Last edited by pewex; 12-29-2012 at 15:27.
pewex is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-29-2012 , 15:56   Re: Ambience sound xyz rounds
Reply With Quote #2

Search the forum and try to edit it yourself. This is scripting help forum not the request forum.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
pewex
Senior Member
Join Date: Dec 2010
Location: AlliedMods
Old 12-29-2012 , 16:22   Re: Ambience sound xyz rounds
Reply With Quote #3

Quote:
Search the forum and try to edit it yourself. This is scripting help forum not the request forum.
pff, i want scripting help.....

please..
pewex is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 12-29-2012 , 16:55   Re: Ambience sound xyz rounds
Reply With Quote #4

PHP Code:
#include <amxmodx>

new const AmbienSound[] = "zombie_plague/round_start5.wav";

#define POSSIBLE_ROUND_NUM_PER_MAP 50

new i
new g_iPlayed

public plugin_precache () 
{
    
precache_soundAmbienSound );
}

public 
plugin_init () 
{
    
register_plugin"Ambience Sound""0.1",  "DeeKeiD" );
    
register_logevent"OnRoundStart"2"1=Round_Start" );
    
    
random_num(1POSSIBLE_ROUND_NUM_PER_MAP)
}

public 
OnRoundStart()
{    
    static 
i2
    
if(!g_iPlayed)
    {
        ++
i2
        
if(i2 == i)
        {
            
g_iPlayed 1
            client_cmd
0"spk %s"AmbienSound );
        }
    }

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-29-2012 , 17:34   Re: Ambience sound xyz rounds
Reply With Quote #5

Quote:
Originally Posted by pewex View Post
pff, i want scripting help.....

please..
Scripting Help means that you have the ability to create it yourself, you just are having problems doing it. You should not be coming in here asking for people to do it for you, you need to show what you have tried and if it doesn't work, we help you figure out why and explain to you how you can fix it.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
pewex
Senior Member
Join Date: Dec 2010
Location: AlliedMods
Old 12-30-2012 , 10:08   Re: Ambience sound xyz rounds
Reply With Quote #6

hmmm, example: "plugin played, ambience sound only: TWO ROUND on map (RANDOM ROUND).

edits only this:

Quote:
g_iPlayed = 2 // number round
client_cmd
( 0, "spk %s", AmbienSound );
yes, its so good?
pewex 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 13:27.


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