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

CS:GO Prime Status Kicker


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MonsteQ
Member
Join Date: May 2018
Location: Hungary
Old 01-20-2019 , 05:09   CS:GO Prime Status Kicker
Reply With Quote #1

Hey everybody! I found a sourcemod plugin for CS:GO.

Can somebody help me make a white list with a Steam ID through which I allow the game server to come up?

Source Code:
PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <SteamWorks>
char g_sLogs[PLATFORM_MAX_PATH 1];
#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()
{
   
BuildPath(Path_SMg_sLogssizeof(g_sLogs), "logs/free2bekicked.log");
}

public 
void OnClientPostAdminCheck(int client)
{
    if (
CheckCommandAccess(client"BypassPremiumCheck"ADMFLAG_ROOTtrue))
    {
        return;
    }
    
    if (!
SteamWorks_HasLicenseForApp(client624820))
    {
        
//KickClient(client, "You need a paid CS:GO account to play on this server");
        
LogToFile(g_sLogs"%L doesn't have paid  CSGO."client);
        return;
    }
    
    return;

__________________
--------------------------------
MonsteQ is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 01-20-2019 , 05:33   Re: CS:GO Prime Status Kicker
Reply With Quote #2

There is already a whitelist in that plugin, just give whoever you want to allow to join the "BypassPremiumCheck" override.
CliptonHeist is offline
MonsteQ
Member
Join Date: May 2018
Location: Hungary
Old 01-20-2019 , 05:47   Re: CS:GO Prime Status Kicker
Reply With Quote #3

For example, it is white that I have a friend but I don't have the CS: GO and I would add the STEAM ID to a file in a configs folder and then he could come up with someone I have allowed and no prime.
__________________
--------------------------------
MonsteQ is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 01-20-2019 , 06:49   Re: CS:GO Prime Status Kicker
Reply With Quote #4

Quote:
Originally Posted by CliptonHeist View Post
There is already a whitelist in that plugin, just give whoever you want to allow to join the "BypassPremiumCheck" override.
That is not correct, https://sm.alliedmods.net/new-api/co...kCommandAccess

The fourth argument is true, meaning that it'll not try to find the command and will just take ADMFLAG_ROOT into consideration. If he edits the true into false, it'll work.


This means you need to edit on the code of "CheckCommandAccess" the part of "true" to edit to "false".

On top of that, here's an example of override of whitelist. Take note that you should append the thing I sent to the existing one or all your data will be erased. Take note that Sourcebans may interfere with this, but unlikely to do it.

The admins_groups.cfg is a one-time thing, and you should edit admins.cfg every time you wanna add / remove a person from whitelisted. But these two configs will NOT work unless you edit the true into false in the code you sent.
Attached Files
File Type: cfg admin_groups.cfg (886 Bytes, 84 views)
File Type: cfg admins.cfg (1.4 KB, 88 views)
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 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 14:31.


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