Closed ghost closed 4 years ago
So it does not allow free primes to join? I can do more research to see if there is a way to detect this.
http://api.steampowered.com/IPlayerService/GetSteamLevel/v1 You can check the steam level with this link. There should be a way to check the Prime badge.
It gives me my steam profile level. Not my CSGO level. Isn't prime entangled to the in game level rather than the steam profile level?
In any case tho, if this conversation is to be trusted, even if we do that we still can't reliably detect users that bought the CSGO prime status after mid 2018.
This post also says that there is no API endpoint to get the in-game level or the prime status. So you can use the sm_veterans_excludeprimes
cvar to whitelist them from the check, but I don't suggest using sm_veterans_kickf2p
to throw players out without playtime check. Until Valve allows us to query this sort of information.
sv_prime_accounts_only
seem to work tho. So for not allowing non-prime users to connect you can use that.
@falahati this is a very frequent problem in CSGO, a player that has Status Prime reaching Level 21 are not "detected" as Status Prime, so what I could understand is that in fact they do not earn Prime, but a "license" to play with players Prime, who bought the game in the case.
One solution that many implemented was to check the Level CSGO, that is, the player must have at least Level X to enter the server if he does not have Status Prime.
That is, if he does not have Prime, but has Level X in CSGO he is already able to enter. Remembering that this check must also be saved in database / cache, because if the player resets his CSGO Level, uploading until the end he would have to reach Level X again to connect to the server. A suggestion would be, after players pass this check save their Steam_ID so that they don't check again and they can enter, they only do the check again if they reset / delete the server's database / cache.
Did you understand more or less? Sorry for the bad English.
@crashzk, As far as I know, there is no way to query the user's current CSGO level! If there was a way we could do as you suggest tho. We could even make a public whitelist database.
@falahati so, I use an exclusive plugin for this: https://github.com/Summer-16/CSGO-NonPrimePlayerKicker
It has this option and works 100%. If the player does not have Prime Status, but his CSGO Level is greater than 3, he is already able to enter my servers.
I tested it myself with new free accounts, without Prime and without the necessary Level and it worked. Then I got to Level 3 at CSGO, and I managed to enter normally, even without Prime.
the following code:
SteamWorks_HasLicenseForApp(client, 624820) == k_EUserHasLicenseResultHasLicense
It does not detect the prime after the 21 level. So those who are free prime.