Raised This Month: $ Target: $400
 0% 

[CSGO] Disable votekick when there's only two player on the server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Skullmasher
Junior Member
Join Date: Jan 2014
Old 09-18-2016 , 05:19   [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #1

Hello There.

I want to avoid people doing 1v1, kicking every people that joins the server.

Thanks for passing by. Have a nice day.
Skullmasher is offline
Frederikk
Junior Member
Join Date: Sep 2016
Old 09-18-2016 , 17:17   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #2

Hey there, I have made a script that hopefully does what you need. It was made really fast and I can't test it as it's really late here, so try it out and tell me if it works. If it does not work, I will try to fix it tommorow and maybe publish it.
Attached Files
File Type: sp Get Plugin or Get Source (nokick.sp - 276 views - 705 Bytes)
Frederikk is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 09-18-2016 , 17:33   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #3

@frederikk does GetClientCount() count bots too?
hamilton5 is offline
Frederikk
Junior Member
Join Date: Sep 2016
Old 09-18-2016 , 17:38   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #4

Quote:
Originally Posted by hamilton5 View Post
@frederikk does GetClientCount() count bots too?
No, it does not.
Frederikk is offline
Skullmasher
Junior Member
Join Date: Jan 2014
Old 09-18-2016 , 20:45   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #5

Are you for real ? This is awesome ! I'm heading to bed I don't have friends to test this at the moment. Will report back tomorrow !

Last edited by Skullmasher; 09-18-2016 at 20:46.
Skullmasher is offline
Skullmasher
Junior Member
Join Date: Jan 2014
Old 09-19-2016 , 20:40   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #6

Thank you so very much, the plugins work as expected I turned the VOTELIMIT variable to 6 for good measure on the Public competitive server. People can't do 1v1 now and the server gets populated ! I will mark this thread as solve.

@Frederikk I believe there's a need for this plugin. You should publish it. If you do not really want to would you mind if I do it ? I will put you in the author of the plugin of course. Could be interesting if votemilimit could be a server variable.
Skullmasher is offline
Skullmasher
Junior Member
Join Date: Jan 2014
Old 09-19-2016 , 20:41   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #7

I can't seem to find the option to mark this thread as resolve.
Skullmasher is offline
Frederikk
Junior Member
Join Date: Sep 2016
Old 09-20-2016 , 01:46   Re: [CSGO] Disable votekick when there's only two player on the server
Reply With Quote #8

I'm glad that I could help. I don't know if you read the whole script, but setting the VOTELIMIT constant to 6 causes votekick to be enabled if the number of clients is greater than 6 and disabled if there are 6 or less players. So setting it to 6 prevents also 3vs3, 2vs3, 2vs2 etc.
I would rather publish this plugin on my own as I'm trying to build a portfolio which is directly connected to me (this was my first plugin that I'm sharing with the community).
I will add cvars as you requested - the votelimit cvar and enable/disable plugin cvar. I will get to it later today.

EDIT: Here's the published plugin. I've added the cvars you wanted.

Last edited by Frederikk; 09-20-2016 at 12:00.
Frederikk 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 12:18.


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