AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Ambience sound xyz rounds (https://forums.alliedmods.net/showthread.php?t=204365)

pewex 12-29-2012 15:26

Ambience sound xyz rounds
 
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 :D

wickedd 12-29-2012 15:56

Re: Ambience sound xyz rounds
 
Search the forum and try to edit it yourself. This is scripting help forum not the request forum.

pewex 12-29-2012 16:22

Re: Ambience sound xyz rounds
 
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..

pokemonmaster 12-29-2012 16:55

Re: Ambience sound xyz rounds
 
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 );
        }
    }



YamiKaitou 12-29-2012 17:34

Re: Ambience sound xyz rounds
 
Quote:

Originally Posted by pewex (Post 1862966)
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.

pewex 12-30-2012 10:08

Re: Ambience sound xyz rounds
 
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?


All times are GMT -4. The time now is 13:27.

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