Raised This Month: $12 Target: $400
 3% 

[REQ CS:GO] KDR checker before on connect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 05-11-2015 , 10:29   [REQ CS:GO] KDR checker before on connect
Reply With Quote #1

I need a plugin which check user KDR in MySQL db when he try to connect on the server. If the player's KDR is < 1.2 then he'll be kicked. I also need to allow some steamid from a txt file.

KDR limit (1.2 here) could be edited by cvar
__________________
irepz is offline
secondtimesold
Senior Member
Join Date: Feb 2015
Old 05-11-2015 , 13:33   Re: [REQ CS:GO] KDR checker before on connect
Reply With Quote #2

lol what kind of server do you run that requires +1.2 kdr?

just curious.

good luck
__________________
secondtimesold is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 05-11-2015 , 14:23   Re: [REQ CS:GO] KDR checker before on connect
Reply With Quote #3

just retakes with a large panel of skillgroups =)
__________________
irepz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-11-2015 , 15:38   Re: [REQ CS:GO] KDR checker before on connect
Reply With Quote #4

Does the server that they connect to also store Kills & Deaths? Because if the limit is also on the server recording stats, it will start to exclude players who do poorly until eventually no one is left.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
irepz
Senior Member
Join Date: Mar 2013
Location: France
Old 05-12-2015 , 03:45   Re: [REQ CS:GO] KDR checker before on connect
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
Does the server that they connect to also store Kills & Deaths? Because if the limit is also on the server recording stats, it will start to exclude players who do poorly until eventually no one is left.
Nope, the plugin will not be on the "recording" server. Just for others servers.
__________________
irepz is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-12-2015 , 14:50   Re: [REQ CS:GO] KDR checker before on connect
Reply With Quote #6

Here's something I whipped up.

--

Cvars:
sm_kdr_min <value>
- Default: 1.2
- Minimum KDR for player to stay in the server.

sm_kdr_sqlgroup <group>
- Default: default
- SQL Configuration to use

Cvars are stored in a generated config file located at: csgo/cfg/sourcemod/kdr.cfg

--

Expected SQL table structure:
Table name: Players
Fields:
  • Steam3 - String type - Format of Steam3 auth strings [U:1:8307981]
  • Kills - Integer type
  • Deaths - Integer type

You can change the fields in the query and even the auth type to Steam2 or Steam64 if you need to.

--

EDIT: I remembered you wanted a whitelist file, so I added that in as well.

Same as the query, the file checks for Steam3 auth strings.

The file is located at: csgo/addons/sourcemod/configs/kdr/whitelist.txt
Attached Files
File Type: sp Get Plugin or Get Source (kdr_min.sp - 234 views - 2.9 KB)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 05-12-2015 at 15:08.
Exolent[jNr] is offline
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 05:41.


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