AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CSS]RoundSound++ (https://forums.alliedmods.net/showthread.php?t=87915)

ANTiCHRiST 03-18-2009 05:45

[CSS]RoundSound++
 
3 Attachment(s)
Description:
A new Version of RoundSound renamed as RoundSound++. Adds the Funny Rounds Sounds.

CVar list:
Quote:

Originally Posted by cvars
sm_roundsound_version - The version of RoundSound++.
sm_roundsound_enable - Sets the RoundSounds++ on or off.

Install Constructions:
Upload the content of the folder "cstrike" in your "cstrike" folder on your Server.
Quote:

Originally Posted by dir
- cstrike\
- - addons\
- - - sourcemod\
- - - - plugins\
- - - - - RoundSound++.smx
- - - - scripting\
- - - - - RoundSound++.sp
- - sound\
- - - misc\
- - - - ctwinnar2.wav
- - - - ctwinnar3.wav
- - - - ctwinnar4.wav
- - - - twinnar.wav
- - - - twinnar2.wav
- - - - twinnar3.wav

Credits:

Quote:

Originally Posted by credits
Original Counter-Strike: 1.6 AMXX Plugin Creator PaintLancer
New CS: Source Creator TanaToS aka ANTiCHRiST from ES, ESP
Thanks to NAT for his help

Changelog:

Quote:

Originally Posted by changelog
- 0.0.1 - First preAlpha
--- [Fix] Var Type Error.
- 0.0.2 - First Alpha
--- [Fix] Creat Unload code.
- 0.1.0 - First Closed Beta
--- [Fix] Client Playing.
- 0.1.1 - Privat Beta
--- [Fix] Playing Bug.
- 1.0.0 - Frist Release Candidate
--- [Fix] Log Bug.
- 1.0.1 - First Release
--- [Add] ConVars.
- 1.1.0 - Final Release
--- [Fix] PrecacheSound() Bug.

Greetz, ANTiCHRiST aka TanaToS. :wink:

shustas 03-27-2009 09:14

Re: [CSS]RoundSound++
 
Cool, does it play sounds to everyone or only to winners?

ANTiCHRiST 03-27-2009 19:31

Re: [CSS]RoundSound++
 
Quote:

Originally Posted by shustas (Post 790140)
Cool, does it play sounds to everyone or only to winners?

to all

shustas 03-28-2009 09:13

Re: [CSS]RoundSound++
 
Could you make it so it doesnt play sounds after the last round, when map is finished?

ANTiCHRiST 03-28-2009 13:48

Re: [CSS]RoundSound++
 
Quote:

Originally Posted by shustas (Post 791174)
Could you make it so it doesnt play sounds after the last round, when map is finished?

hmm don't know what you mean play it if no team win and the map ends or play it after a team wins?

krzynek1 03-28-2009 18:21

Re: [CSS]RoundSound++
 
when begins intermission_timelimit/fraglimit

shustas 03-28-2009 19:39

Re: [CSS]RoundSound++
 
Doesnt matter who wins on the last round when score is shown dont play music

ANTiCHRiST 03-28-2009 19:43

Re: [CSS]RoundSound++
 
think u thats important? i dont know a way to fix this but i will search one

noPASARAN 04-29-2009 13:16

Re: [CSS]RoundSound++
 
ANTiCHRiST for a long time searched for a similar plug-in for SM and OMG!!! Here it))), but one problem and very basic, after installation plug-in it works exactly till the moment change map, and then silence in an aether (sounds do not work). What not so? I change nothing, I installed all by default!!!

NAT 05-05-2009 11:06

Re: [CSS]RoundSound++
 
noPASARAN
all:
Code:

decl String:tewin_snd1[MAX_FILE_LEN];
Format(tewin_snd1, sizeof(tewin_snd1), "sound/misc/twinnar.wav");
AddFileToDownloadsTable(tewin_snd1);
PrecacheSound()

cut in OnMapStart()

Code:

/* *
 * ANTiCHRiST RoundSound++
 * -------------------------
 * Changelog
 *  changelog.txt
 * Readme
 *  readme.txt
 * Credits
 *  Old CS 1.6 Plugin
 *  by "PaintLancer"
 * -------------------------
 * by TanaToS aka ANTiCHRiST
 */
#include <sourcemod>
#include <sdktools>
#include <sdktools_sound>
#include <console>
#include <string>

#pragma semicolon 1

#define PLUGIN_VERSION "1.0.1"
#define MAX_FILE_LEN 256

new Handle:g_hEnabled = INVALID_HANDLE;
new bool:g_bEnabled = true;

public Plugin:myinfo = {
        name = "RoundSound++",
        author = "ANTiCHRiST",
        description = "Plays a Sound at RoundEnd.",
        version = PLUGIN_VERSION,
        url = "http://passionfighters.de"
};

public OnPluginStart() {
        CreateConVar("sm_roundsound_version", PLUGIN_VERSION, "RoundSound++ version.", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
        g_hEnabled = CreateConVar("sm_roundsound_enable", "1", "RoundSound++ Enable/Disable CVar.", FCVAR_PLUGIN|FCVAR_NOTIFY);

        HookEvent("round_end", EventRoundEnd);
        HookConVarChange(g_hEnabled, CVarEnabled);
}

public OnMapStart()
{
        decl String:tewin_snd1[MAX_FILE_LEN];
        decl String:tewin_snd2[MAX_FILE_LEN];
        decl String:tewin_snd3[MAX_FILE_LEN];
        decl String:ctwin_snd1[MAX_FILE_LEN];
        decl String:ctwin_snd2[MAX_FILE_LEN];
        decl String:ctwin_snd3[MAX_FILE_LEN];

        Format(tewin_snd1, sizeof(tewin_snd1), "sound/misc/twinnar.wav");
        Format(tewin_snd2, sizeof(tewin_snd2), "sound/misc/twinnar2.wav");
        Format(tewin_snd3, sizeof(tewin_snd3), "sound/misc/twinnar3.wav");
        Format(ctwin_snd1, sizeof(ctwin_snd1), "sound/misc/ctwinnar2.wav");
        Format(ctwin_snd2, sizeof(ctwin_snd2), "sound/misc/ctwinnar3.wav");
        Format(ctwin_snd3, sizeof(ctwin_snd3), "sound/misc/ctwinnar4.wav");

        if(FileExists(tewin_snd1) && FileExists(tewin_snd2) && FileExists(tewin_snd3) && FileExists(ctwin_snd1) && FileExists(ctwin_snd2) && FileExists(ctwin_snd3)) {
                AddFileToDownloadsTable(tewin_snd1);
                AddFileToDownloadsTable(tewin_snd2);
                AddFileToDownloadsTable(tewin_snd3);
                AddFileToDownloadsTable(ctwin_snd1);
                AddFileToDownloadsTable(ctwin_snd2);
                AddFileToDownloadsTable(ctwin_snd3);

                PrecacheSound("misc/ctwinnar2.wav", true);
                PrecacheSound("misc/ctwinnar3.wav", true);
                PrecacheSound("misc/ctwinnar4.wav", true);
                PrecacheSound("misc/twinnar.wav", true);
                PrecacheSound("misc/twinnar2.wav", true);
                PrecacheSound("misc/twinnar3.wav", true);
        }
        else {
                LogError("Not all sound files exists.");
                LogError("Unload the Plugin.");
                ServerCommand("sm plugins unload \"RoundSound++.smx\"");
        }
}

public OnConfigsExecuted() {
        if(GetConVarBool(g_hEnabled)) {
                g_bEnabled = true;
        }
        else if(!GetConVarBool(g_hEnabled)) {
                g_bEnabled = false;
        }
        else {
                g_bEnabled = true;
                LogError("False value plugin continued");
        }
}

public CVarEnabled(Handle:convar, const String:oldValue[], const String:newValue[]) {
        if(GetConVarBool(g_hEnabled)) {
                g_bEnabled = true;
        }
        else if(!GetConVarBool(g_hEnabled)) {
                g_bEnabled = false;
        }
        else {
                g_bEnabled = true;
                LogError("False value plugin continued");
        }
}

public EventRoundEnd(Handle:event, const String:name[], bool:dontBroadcast) {
        new rnd_sound = GetRandomInt(1, 3);
        new ev_winner = GetEventInt(event, "winner");
        if(g_bEnabled) {
                if(ev_winner == 2) {
                        if(rnd_sound == 1) {
                                EmitSoundToAll("misc/twinnar.wav");
                        }
                        else if(rnd_sound == 2) {
                                EmitSoundToAll("misc/twinnar2.wav");
                        }
                        else if(rnd_sound == 3) {
                                EmitSoundToAll("misc/twinnar3.wav");
                        }
                        else {
                                LogError("Ramdom Sound CVar Error.");
                        }
                }
                else if(ev_winner == 3) {
                        if(rnd_sound == 1) {
                                EmitSoundToAll("misc/ctwinnar2.wav");
                        }
                        else if(rnd_sound == 2) {
                                EmitSoundToAll("misc/ctwinnar3.wav");
                        }
                        else if(rnd_sound == 3) {
                                EmitSoundToAll("misc/ctwinnar4.wav");
                        }
                        else {
                                LogError("Ramdom Sound CVar Error.");
                        }
                }
                else {
                        LogError("No team has win the round.");
                }
        }
}



All times are GMT -4. The time now is 08:28.

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