Raised This Month: $95 Target: $400
 23% 

HLSS Block


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Zenith77 (34)
v13ttweaker
Member
Join Date: May 2007
Location: Honolulu, HI
Old 01-27-2008 , 06:04   HLSS Block
Reply With Quote #1

Some plugin I found that just blocks people from playing music over HLSS or something. Thought it might be useful for somepeople who don't like others spamming music on their server.

Code:
/*
HLSS Blocker v0.1
Copyright (C) 2005-2007 Ian (Juan) Cammarata
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.
 
You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------
 
http://ian.cammarata.us
For AMXX 1.71 or higher
*/
 
/*
*Cvars:
* voice_inputfromfile
* voice_forcemicrecord
*/
 
#include <amxmodx>
 
#define VERSION "0.1"
 
new p_enabled
 
public hlss_query( )
{
    if( get_pcvar_num( p_enabled ) )
    {
        new clnt[32], num
        get_players( clnt, num, "c" )
        for( new i = 0; i < num; i++ )
        {
            query_client_cvar( clnt[i], "voice_inputfromfile", "hlss_block" )
            query_client_cvar( clnt[i], "voice_forcemicrecord", "hlss_block" )
        }
    }
    return PLUGIN_HANDLED
}
 
public hlss_block( id, cvar[], value[] )
{
    if( get_pcvar_num( p_enabled ) > 0 )
    {
        new intval = str_to_num( value )
        if( equal( cvar, "voice_inputfromfile" ) && intval != 0 )
        {
            client_cmd( id, "voice_inputfromfile 0" )
            client_cmd( id, "-voicerecord" )
        }
        if( equal( cvar, "voice_forcemicrecord" ) && intval != 1 )
        {
            client_cmd( id, "voice_forcemicrecord 1" )
            client_cmd( id, "-voicerecord" )
        }
    }
    return PLUGIN_HANDLED
}
 
public plugin_init( )
{
    register_plugin( "HLSS Blocker", VERSION, "Ian Cammarata" )
    register_cvar( "HLSS Blocker", VERSION, FCVAR_SERVER )
 
    p_enabled = register_cvar( "amx_block_hlss", "1" )
 
    set_task( 1.0, "hlss_query",_,_,_,"b" )
 
    return PLUGIN_CONTINUE
}
Attached Files
File Type: sma Get Plugin or Get Source (hlss_blocker.sma - 3013 views - 2.2 KB)
__________________



Check Out My Forums!
http://www.setbb.com/azngamerz

Last edited by Brad; 01-30-2008 at 18:08.
v13ttweaker is offline
Send a message via AIM to v13ttweaker
Dric Laar
BANNED
Join Date: Dec 2007
Old 01-28-2008 , 05:09   Re: HLSS Block
Reply With Quote #2

Nice...looks pretty good...

I will test in tomarrow though, getting late now :\

EDIT: Skratch that, I tested it on my server, and it seems to work fine for me. I don't see any problems with it, but I didn't test it extensively.

Last edited by Dric Laar; 01-28-2008 at 07:00. Reason: I did test it :P
Dric Laar is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 01-30-2008 , 15:27   Re: HLSS Block
Reply With Quote #3

Don't include a compiled .amxx with your post, the forum will compile the .sma for you.
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 01-30-2008 , 18:09   Re: HLSS Block
Reply With Quote #4

I removed the compiled version. Like Pro Patria Finland said, do not include the compiled version.
__________________
Brad is offline
Old 01-31-2008, 14:02
Vm|Mayhem
This message has been deleted by Vm|Mayhem.
Vm|Mayhem
Senior Member
Join Date: Feb 2005
Location: Murrieta, CA.
Old 01-31-2008 , 14:20   Re: HLSS Block
Reply With Quote #5

Nice, works nicely.
Vm|Mayhem is offline
Send a message via AIM to Vm|Mayhem
v13ttweaker
Member
Join Date: May 2007
Location: Honolulu, HI
Old 02-02-2008 , 21:58   Re: HLSS Block
Reply With Quote #6

Thanks.
__________________



Check Out My Forums!
http://www.setbb.com/azngamerz
v13ttweaker is offline
Send a message via AIM to v13ttweaker
Shad0wZ
New Member
Join Date: Mar 2008
Old 03-09-2008 , 14:16   Re: HLSS Block
Reply With Quote #7

Hey,

Recently i discovered about this, but i have a question:

I'd like to block most people from using HLSS, but i'd really like to see an exception list for people who still can use HLSS.
If its not too much of work, could someone add an exception list per steam id for this script?

Thanks,
- Shad0wZ

Last edited by Shad0wZ; 03-09-2008 at 14:23.
Shad0wZ is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 03-21-2008 , 14:29   Re: HLSS Block
Reply With Quote #8

good idea shadowz, if u can put like an .ini to read from so it lets some people to play hlss (cuz some servers has official dj :])
If it is impossible, still nice work on the plugin :]
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
Tr3c3
New Member
Join Date: May 2006
Old 03-29-2008 , 17:26   Re: HLSS Block
Reply With Quote #9

I wanna apologize, 'cause I'm from Argentina, so my english isn't the best you have ever seen...

The persons that don't get blocked by the plugin, probably don't use HLSS, simply they put the music on their media player software or component system.

About the idea of excluding from the block people that is the "Official DJ of the server", means to check if the player is allowed to play music on the server before each block, so I think it can be done.

Regards.

Tr3c3
Tr3c3 is offline
v13ttweaker
Member
Join Date: May 2007
Location: Honolulu, HI
Old 03-30-2008 , 00:50   Re: HLSS Block
Reply With Quote #10

Actually it does detect hlss some how.
__________________



Check Out My Forums!
http://www.setbb.com/azngamerz
v13ttweaker is offline
Send a message via AIM to v13ttweaker
Reply


Thread Tools
Display Modes

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 14:22.


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