Raised This Month: $63 Target: $400
 15% 

[HELP] Compile Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gildevanaraujo
Senior Member
Join Date: Oct 2018
Location: Brazil
Old 07-23-2019 , 20:49   [HELP] Compile Plugin
Reply With Quote #1

Hello everyone!
I would like to implement on my server a plugin that will not accept any player who does not have prime status on the account, only accept players who bought the game or just got level 21 in the free accounts.

I found this plugin and wanted to recompile it for the root flag, admin generic and reservation have immunity, but I'm not getting it.

Could someone help me?

ERROR:
Code:
Following is the error name: csgo\addons\sourcemod\scripting\include\SteamWorks.inc(206):fatal error 196:deprecated syntax; see https://wiki.alliedmods.net/SourcePawn_Transitional_Syntax#Typedefs
Code:

PHP 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_ROOTtrue) || CheckCommandAccess(client"BypassPremiumCheck"ADMFLAG_GENERICtrue) || CheckCommandAccess(client"BypassPremiumCheck"ADMFLAG_RESERVATIONtrue))
    
/*if (CheckCommandAccess(client, "BypassPremiumCheck", ADMFLAG_ROOT, true))*/
    
{
        return;
    }
    
    if (
k_EUserHasLicenseResultDoesNotHaveLicense == SteamWorks_HasLicenseForApp(client624820))
    {
        
KickClient(client"VocÍ precisa ter o jogo comprado ou level 21 para jogar em nossos servidores, desculpe :)");
        return;
    }
    
    return;

gildevanaraujo is offline
painlesstgp
Member
Join Date: May 2019
Location: Sweden
Old 07-23-2019 , 22:31   Re: [HELP] Compile Plugin
Reply With Quote #2

sv_prime_accounts_only 1 in your server.cfg
painlesstgp is offline
painlesstgp
Member
Join Date: May 2019
Location: Sweden
Old 07-23-2019 , 22:46   Re: [HELP] Compile Plugin
Reply With Quote #3

But if that doesn't suite your needs here's the compiled version of the code you provided.

P.S. I saw that you had commented out the root flag command, was this with intention or not?

Code:
/*if (CheckCommandAccess(client, "BypassPremiumCheck", ADMFLAG_ROOT, true))*/
If you wan't a compile with this uncommented just say so.
Blocked Attachments
File Type: smx Free2BeKicked.smx
File Type: smx Free2BeKicked uncommented.smx

Last edited by painlesstgp; 07-23-2019 at 22:49.
painlesstgp is offline
gildevanaraujo
Senior Member
Join Date: Oct 2018
Location: Brazil
Old 07-23-2019 , 23:03   Re: [HELP] Compile Plugin
Reply With Quote #4

Quote:
Originally Posted by painlesstgp View Post
But if that doesn't suite your needs here's the compiled version of the code you provided.

P.S. I saw that you had commented out the root flag command, was this with intention or not?

Code:
/*if (CheckCommandAccess(client, "BypassPremiumCheck", ADMFLAG_ROOT, true))*/
If you wan't a compile with this uncommented just say so.
Yes, it was intentional ... because I want to add more flags to be immune to this plugin, so I want to recompile it.
gildevanaraujo is offline
iluvit9887
Junior Member
Join Date: Sep 2018
Old 07-24-2019 , 08:15   Re: [HELP] Compile Plugin
Reply With Quote #5

Quote:
Originally Posted by gildevanaraujo View Post
Yes, it was intentional ... because I want to add more flags to be immune to this plugin, so I want to recompile it.
https://wiki.alliedmods.net/Compiling_SourceMod_Plugins
iluvit9887 is offline
painlesstgp
Member
Join Date: May 2019
Location: Sweden
Old 07-25-2019 , 06:50   Re: [HELP] Compile Plugin
Reply With Quote #6

Quote:
Originally Posted by gildevanaraujo View Post
Yes, it was intentional ... because I want to add more flags to be immune to this plugin, so I want to recompile it.
Well, I compiled 2 of them, the first one "Free2BeKicked.smx" is with the command commented out.

Enjoy.
painlesstgp is offline
painlesstgp
Member
Join Date: May 2019
Location: Sweden
Old 07-26-2019 , 04:03   Re: [HELP] Compile Plugin
Reply With Quote #7

Realised my files didnt get approved.

I will post smx and sp version of both commented out and uncommented.
Attached Files
File Type: sp Get Plugin or Get Source (Free2BeKicked.sp - 3 views - 1.2 KB)
File Type: sp Get Plugin or Get Source (Free2BeKicked uncommented.sp - 6 views - 1.2 KB)
File Type: smx Free2BeKicked.smx (4.1 KB, 4 views)
File Type: smx Free2BeKicked uncommented.smx (4.1 KB, 4 views)
painlesstgp 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 17:40.


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