It's undeniably possible to do. How easy it is to fake your rank is another issue unfortunately ( which I have no clue the answer
)
Here my version of the situation, not my code:
Code:
#pragma semicolon 1
#include <sourcemod>
#include <SteamWorks>
#define PLUGIN_VERSION "1.0.0"
public Plugin myinfo = {
name = "Free2BeKicked - CS:GO",
author = "Asher \"asherkin\" Baker, psychonic",
description = "Automatically kicks non-premium players.",
version = PLUGIN_VERSION,
url = "http://limetech.org/"
};
public OnPluginStart()
{
CreateConVar("anti_f2p_version", PLUGIN_VERSION, "Free2BeKicked", FCVAR_DONTRECORD|FCVAR_NOTIFY);
}
public void OnClientPostAdminCheck(int client)
{
if (CheckCommandAccess(client, "BypassPremiumCheck", ADMFLAG_ROOT, true))
{
return;
}
else if(rank = GetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_nPersonaDataPublicLevel", _, client) > 1)
{
return;
}
if (k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client, 624820))
{
KickClient(client, "You need a paid CS:GO account to play on this server");
return;
}
return;
}
__________________
I am available to make plugins for pay.
Discord: Eyal282#1334