Hi! I found in some older topics that
Code:
GetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_nPersonaDataPublicLevel", _, client)
should give me player CS:GO level, but instead it is always -1 even on fresh steam account.
So my question is if there is any way to check player CS:GO level or if this code should work then if you have any ideas why it doesn`t work for me?
Edit: I found out that if I run this code in OnClientPostAdminCheck() it doesn`t work, but if I use command
Code:
public Action Command_SteamLvl(int client, int args)
{
int x = GetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_nPersonaDataPublicLevel", _, client);
PrintToChat(client, "%d", x);
}
it is working properly, so now the question is where should I put this piece of code to check if player has certain level and kick him from server if he doesn`t. I wouldn`t like to check all players every round to determine if their level is ok, it should happen on player connect.