Raised This Month: $32 Target: $400
 8% 

Sound plugin for CS:GO


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jorma
Junior Member
Join Date: Jul 2013
Old 07-30-2013 , 07:38   Sound plugin for CS:GO
Reply With Quote #1

Hi

I am new to game scripting even though I have some programming experience. I'm planning to create a sound plugin for CS:GO. It's like the Quade Sound plugin so everytime a special event happens some audio file is played, either for all players or for all players who play in the specific team.

For example:
if bomb has been planted the planter's team will here some audio file
if the round ends and the scores are 5 - 1, some audio file is played for the winning team players
if the player killstreaks 3 players, everyone will hear some audio file

It is possible to do this with SourceMod? I have looked the API but since I'm a person who learns best by looking examples it's a little difficult for me to get started. I haven't found any script examples for CS:GO.

Thanks.
jorma is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 07-30-2013 , 09:30   Re: Sound plugin for CS:GO
Reply With Quote #2

Hey,

yes it's possible to do this. Take a look at the Quake-Sounds Plugin, and you can learn very much.
__________________
If you need any help, feel free to add me on Steam.



Last edited by Triniayo; 07-30-2013 at 09:30.
Triniayo is offline
Send a message via Skype™ to Triniayo
jorma
Junior Member
Join Date: Jul 2013
Old 07-30-2013 , 09:53   Re: Sound plugin for CS:GO
Reply With Quote #3

I have to take a look at it.

If there are more good example files (for CS:GO), please let me know!
jorma is offline
jorma
Junior Member
Join Date: Jul 2013
Old 07-30-2013 , 12:39   Re: Sound plugin for CS:GO
Reply With Quote #4

Quote:
Compile and load your plugin on your server and see for yourself that the message is displayed in server console.
Why there is no better explanation on this

I made a simple hello world script and put the .smx file in to the dedicatedserver\csgo\addons\sourcemod\plugins folder (just like Quake Sounds). I run the server and joined the game but I didnt see the message in the console. I also tried to put the file on my local CSGO installation dir and play with bots but still nothing.
jorma is offline
ojmdk476oj
AlliedModders Donor
Join Date: Dec 2009
Old 07-30-2013 , 13:16   Re: Sound plugin for CS:GO
Reply With Quote #5

Please post the code of your plugin, so we can see what you have done.

And maybe run
Code:
sm plugins list
ojmdk476oj is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 07-30-2013 , 13:36   Re: Sound plugin for CS:GO
Reply With Quote #6

As johan123jo said, post your code of the plugin. I can help you if you want.
__________________
If you need any help, feel free to add me on Steam.


Triniayo is offline
Send a message via Skype™ to Triniayo
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-30-2013 , 14:16   Re: Sound plugin for CS:GO
Reply With Quote #7

See: CS:GO Quirks
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
jorma
Junior Member
Join Date: Jul 2013
Old 07-30-2013 , 16:05   Re: Sound plugin for CS:GO
Reply With Quote #8

Code:
#include <sourcemod>
//#include <sdktools>
//#include <clientprefs>

//#pragma semicolon 1

#define PLUGIN_VERSION "1.0"

// Plugin definitions
// The public keyword means that SourceMod will be able to directly access our variable. Plugin: defines a type of our variable. myinfo is, obviously, a name of our variable as required by SourceMod. You see that we initialize it right away. This is preferred way to do when filling out plugin info. 
public Plugin:myinfo = 
{
    name = "asd",
    author = "asdsd",
    description = "asddssd",
    version = PLUGIN_VERSION,
    url = "www.example.com"
};

public OnPluginStart()
{
    new a = 0;
    while (a < 1000) {
        PrintToServer("Test");
        a++;
    }
}
I typed sm plugins list in the console but got nothing. I installed the SourceMod in to the csgo folder.

Last edited by jorma; 07-30-2013 at 16:06.
jorma is offline
Triniayo
Senior Member
Join Date: Apr 2011
Location: #include <germany>
Old 07-30-2013 , 17:15   Re: Sound plugin for CS:GO
Reply With Quote #9

Ehm, what the hell did you code?

Your Plugin says "Test" to your Server-Console, when "a < 1000", but "a = 0" ???
__________________
If you need any help, feel free to add me on Steam.



Last edited by Triniayo; 07-30-2013 at 17:16.
Triniayo is offline
Send a message via Skype™ to Triniayo
jorma
Junior Member
Join Date: Jul 2013
Old 07-30-2013 , 17:19   Re: Sound plugin for CS:GO
Reply With Quote #10

I just output 1000 times the text "Test" in to the game console so that I can see the plugin is working properly.
jorma 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 10:19.


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