AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   CS:GO Prime Status Kicker (https://forums.alliedmods.net/showthread.php?t=313725)

MonsteQ 01-20-2019 05:09

CS:GO Prime Status Kicker
 
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;



CliptonHeist 01-20-2019 05:33

Re: CS:GO Prime Status Kicker
 
There is already a whitelist in that plugin, just give whoever you want to allow to join the "BypassPremiumCheck" override.

MonsteQ 01-20-2019 05:47

Re: CS:GO Prime Status Kicker
 
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.

eyal282 01-20-2019 06:49

Re: CS:GO Prime Status Kicker
 
2 Attachment(s)
Quote:

Originally Posted by CliptonHeist (Post 2635594)
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.


All times are GMT -4. The time now is 11:58.

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