Raised This Month: $ Target: $400
 0% 

EmitSoundAny Without INC


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thecount
Veteran Member
Join Date: Jul 2013
Old 07-12-2015 , 21:42   EmitSoundAny Without INC
Reply With Quote #1

Original Post: HERE

I decided to post this for the scripters that don't want to require a custom .inc file for their plugin to compile. Just add these functions to your code and use them as you normally would. Not all functions are required, BUT the variable and OnPluginStart() below ARE required.

PHP Code:
#include <sourcemod>
#include <sdktools>
new bool:sound_req;

public 
OnPluginStart(){
    new 
EngineVersion:engi GetEngineVersion();if(engi == Engine_CSGO || engi == Engine_DOTA){sound_req true;}else{sound_req false;}

Functions:
Spoiler

Last edited by thecount; 07-12-2015 at 21:47.
thecount is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-12-2015 , 23:02   Re: EmitSoundAny Without INC
Reply With Quote #2

The entire point of putting it in an .inc file is so that you didn't have to put the code into every plugin.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-12-2015 , 23:07   Re: EmitSoundAny Without INC
Reply With Quote #3

Lol.

I try to use playgamesound client command whenever, since the files dont have to be precached and its generally easier on the server.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 07-12-2015 , 23:16   Re: EmitSoundAny Without INC
Reply With Quote #4

Quote:
Originally Posted by friagram View Post
Lol.

I try to use playgamesound client command whenever, since the files dont have to be precached and its generally easier on the server.
Yeah but other players can't hear it as a source across map.

Quote:
Originally Posted by Powerlord View Post
The entire point of putting it in an .inc file is so that you didn't have to put the code into every plugin.

I hate custom inc files lol. I'm not saying this is the best way to go, but it is here for when you want others to be able to compile it on default compiler.

Another reason I did this was because the inc file from the page was giving me errors when I tried compiling. *shrug*

Last edited by thecount; 07-12-2015 at 23:18.
thecount is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 07-13-2015 , 04:53   Re: EmitSoundAny Without INC
Reply With Quote #5

Quote:
Originally Posted by thecount View Post
I hate custom inc files lol. I'm not saying this is the best way to go, but it is here for when you want others to be able to compile it on default compiler.
The point of include files is code reusability, I would totally hate to made this code everytime I make a plugin with files...
Yes, default forum compiler can't compile plugins with custom includes, but there is spider and I guess, it will replace the current one.

Last edited by KissLick; 07-13-2015 at 04:54.
KissLick is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 07-13-2015 , 11:19   Re: EmitSoundAny Without INC
Reply With Quote #6

Ok well I was getting errors when compiling so I just took the inc file apart and thought I might as well post it incase someone else finds it useful. That is all that happened. Good day.
thecount is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 07-15-2015 , 13:32   Re: EmitSoundAny Without INC
Reply With Quote #7

You guys make the OP feel like "gee guys sorry that I tried to HELP"...
Potato Uno is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-15-2015 , 13:48   Re: EmitSoundAny Without INC
Reply With Quote #8

Quote:
Originally Posted by Potato Uno View Post
You guys make the OP feel like "gee guys sorry that I tried to HELP"...
You realize that all he's done is copy code from one of my include files and tell people to stick it directly into their plugin, right?

Something they could already do if they didn't want to rely on an external .inc file.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-15-2015 at 13:48.
Powerlord is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 07-15-2015 , 14:36   Re: EmitSoundAny Without INC
Reply With Quote #9

Quote:
Originally Posted by Powerlord View Post
You realize that all he's done is copy code from one of my include files and tell people to stick it directly into their plugin, right?

Something they could already do if they didn't want to rely on an external .inc file.
I didn't copy and paste but someone can delete this thread if it bothers you that much, prick.

Last edited by thecount; 07-15-2015 at 14:37.
thecount is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 07-20-2015 , 23:57   Re: EmitSoundAny Without INC
Reply With Quote #10

Quote:
Originally Posted by thecount View Post
I didn't copy and paste but someone can delete this thread if it bothers you that much, prick.
Hey now let's not resort to name calling.
Potato Uno 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 07:49.


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