AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [HELP] Compile Plugin (https://forums.alliedmods.net/showthread.php?t=317675)

gildevanaraujo 07-23-2019 19:49

[HELP] Compile Plugin
 
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;



painlesstgp 07-23-2019 21:31

Re: [HELP] Compile Plugin
 
sv_prime_accounts_only 1 in your server.cfg

painlesstgp 07-23-2019 21:46

Re: [HELP] Compile Plugin
 
2 Attachment(s)
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.

gildevanaraujo 07-23-2019 22:03

Re: [HELP] Compile Plugin
 
Quote:

Originally Posted by painlesstgp (Post 2660372)
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.

iluvit9887 07-24-2019 07:15

Re: [HELP] Compile Plugin
 
Quote:

Originally Posted by gildevanaraujo (Post 2660374)
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

painlesstgp 07-25-2019 05:50

Re: [HELP] Compile Plugin
 
Quote:

Originally Posted by gildevanaraujo (Post 2660374)
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 07-26-2019 03:03

Re: [HELP] Compile Plugin
 
4 Attachment(s)
Realised my files didnt get approved.

I will post smx and sp version of both commented out and uncommented.


All times are GMT -4. The time now is 18:59.

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