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

[Any] Veterans Only (v1.3, 2020-06-10)


Post New Thread Reply   
 
Thread Tools Display Modes
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-22-2015 , 16:12   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #21

I won't say either method is correct or logical (because that's a subjective basis) but essentially what you're doing by blocking people if they're part of X group, is attacking X group by saying people in X group have to leave X group to play with you. So I can agree in that case it's 'less nice'.
__________________

Last edited by Chdata; 01-22-2015 at 16:12.
Chdata is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-22-2015 , 21:23   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #22

Quote:
Originally Posted by DarkSoroush View Post
It is possible to expand this plugin with the following options:
  1. Reject or accept based on Steam Community Level
  2. Reject or accept based on a specific Badge Level
  3. Reject or accept based on Steam Join Date
  4. Reject or accept based on Subscribed Groups
  5. Reject or accept based on Friends
  6. Reject or accept based on number of purchased games
  7. Reject or accept based on estimated value of account (price of items)
  8. Reject or accept based on total playtime in all games
  9. Reject or accept based on a specific achievement
  10. Reject or accept based on owning/wishlisting/following a specific game
  11. Reject or accept based on achievement unlocked ratio of a specific game
  12. Reject based on Community Ban
  13. Reject based on Trade Ban
I may add some of this features to the plugin if enough people ask for them.
I just realized at least one of my servers could really use this plugin.

Can you detect profiles that haven't been set up yet? I believe that's something different from having a private profile.
And yeah, steam community level is something I'd also like to see.
__________________
Chdata is offline
DarkSoroush
Member
Join Date: Jan 2015
Old 01-23-2015 , 01:41   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #23

Yeah, that's also possible.
DarkSoroush is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-25-2015 , 22:50   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #24

By the way, you might wanna include .smx

It doesn't compile.

Edit: Oh nvm

PHP Code:
ThrowOut(client, const String:reason[])
{
    new 
clientId GetClientUserId(client);
    if (
CheckCommandAccess(clientId"generic_admin"ADMFLAG_GENERICfalse))
    {
        return;
    }
    if (
GetConVarInt(cvar_banTime) > 0)
    {
        
BanClient(clientGetConVarInt(cvar_banTime), BANFLAG_AUTHIDreasonreason);
    }
    else
    {
        
KickClient(clientreason);
    }

Despite this code, it seems that I can't join my own server as root.

I have 5000+ hours in TF2, I set

sm_veterans_cachetime "15"
sm_veterans_gameid "440"
sm_veterans_mintotal "600"
sm_veterans_mintotalminuslastweeks "0"

And it kicks me with the REJECTED message.

I added another field to the translation to print out what time it thinks I have. It prints 0.0
__________________

Last edited by Chdata; 01-25-2015 at 23:33.
Chdata is offline
DarkSoroush
Member
Join Date: Jan 2015
Old 01-28-2015 , 03:47   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #25

Can you give me your SteamId? by Pm if you like. Last time I had a problem with number bigger that 1k, maybe this is something similar.

Last edited by DarkSoroush; 01-28-2015 at 03:48.
DarkSoroush is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-28-2015 , 04:14   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #26

http://steamcommunity.com/id/Chdata/
http://steamidfinder.com the rest

I'm at 5000-6000 hr
__________________

Last edited by Chdata; 01-28-2015 at 04:14.
Chdata is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 03-28-2015 , 07:25   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #27

If you aren't working on this anymore, I might try something with it. Once. Then give up if it doesn't work.

Edit:

Some testing showed it grab my total play time correctly now. Hmm... Could it be the steam servers having been down? idk.

Will a player's cached time override whether or not the player changed their profile to private afterwards?

Would the 'minus last 2 weeks' thing essentially be the same as,
"Total required playtime - does not include your first two weeks of playing"

Since for the first two weeks of a new player's gametime, it'll be 100% - 100% = 0%. And after that, the difference kinda blurs.

You could make a plugin like, "Active Players Only" which kicks people if they have less than X amount of gametime in the past two weeks.

Lastly, some players have more than 600,000 minutes. I set the cvar bounds to MAX_INT in my edit.
__________________

Last edited by Chdata; 03-28-2015 at 08:43.
Chdata is offline
lowheartrate
Member
Join Date: Apr 2015
Location: United States, New York
Old 05-04-2015 , 12:09   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #28

Hmm not sure why but I have adjusted the cfg file that it has generated to kick anyone that has a private profile but whenever someone joins the server that has a private profile they do not get kicked. I know the plugin is working fine on my end for the most part because the minimum hours played restriction works fine, just not the private profile kick method.
lowheartrate is offline
secondtimesold
Senior Member
Join Date: Feb 2015
Old 05-16-2015 , 10:46   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #29

i keep getting this error every once in a while

L 05/16/2015 - 005:15: [veterans.smx] VeteransOnly: Failed to retrieve user's playtime (HTTP status: 0)
__________________
secondtimesold is offline
eric0279
AlliedModders Donor
Join Date: May 2007
Old 05-23-2015 , 02:54   Re: [Any] Veterans Only (v1.0, 2015-01-22)
Reply With Quote #30

Hello,

Only work with SM 1.7.1 or 1.6.X work?.

because, .cfg:
Code:
// This file was auto-generated by SourceMod (v1.7.1)
// ConVars for plugin "veterans.smx"


// Should me ban the player instead of kicking and if we should, for how long (in minutes)?
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "31536000.000000"
sm_veterans_bantime "0"

// Amount of time in seconds that we should not send a delicate request for the same query.
// -
// Default: "86400"
// Minimum: "0.000000"
// Maximum: "31536000.000000"
sm_veterans_cachetime "5"

// Is VeteransOnly plugin enable?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_veterans_enable "1"

// Steam's Store id of the game you want us to check against?
// -
// Default: "550"
// Minimum: "0.000000"
// Maximum: "100000000.000000"
sm_veterans_gameid "550"

// Should we kick the player when something bad happens such as failing to retrieve the user's info?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_veterans_kickfailure "0"

// Should we kick the player when he/she has a private or friend only profile?
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_veterans_kickprivate "0"

// Minimum total playtime amount that player needs to have (in minutes)?
// -
// Default: "600"
// Minimum: "0.000000"
// Maximum: "600000.000000"
sm_veterans_mintotal "360000"

// Minimum total playtime amount (excluding last 2 weeks) that player needs to have (in minutes)?
// -
// Default: "300"
// Minimum: "0.000000"
// Maximum: "600000.000000"
sm_veterans_mintotalminuslastweeks "4900"

// Maximum number of seconds till we consider the requesting connection timed out?
// -
// Default: "10"
// Minimum: "0.000000"
// Maximum: "300.000000"
sm_veterans_timeout "10"
not kicked (i have 5164h and 61h for last 15 days, profile private.

if set sm_veterans_kickfailure 1 :
Quote:
Disconnect: Failed to retrieve your playtime.
Disconnect: Failed to retrieve your playtime.
re edit: data/veterans_cache.txt >> not created!?


Quote:
VeteransOnly: New client, requesting playtime for SteamId XXXXXXX

Last edited by eric0279; 05-24-2015 at 08:49.
eric0279 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 02:16.


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