Problema antilicenta addons csgo

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
Drake21
Membru, skill 0
Membru, skill 0
Posts: 1
Joined: 22 Jan 2019, 20:46
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

22 Jan 2019, 20:58

Salut, este vorba despre addons-ul CSGO Legacy (addon-uri/mod-legacy-arkxes-t359553.html), am incercat sa-i fac "antilicenta" (
| Afiseaza codul
#include amxmodx
#include sqlx

new Handle:g_SqlTuple;
new hasLicense;
new g_Error[512];

public plugin_init()
{
    register_plugin("CSGO License", "1.0", "SideWinder");
    return 0;
}

public plugin_precache()
{
    MySql_Init();
    return 0;
}

public plugin_natives()
{
    register_native("e6117f86f7fcfc7465552067c8491139", "native_e6117f86f7fcfc7465552067c8491139", 1);
    return 0;
}

public MySql_Init()
{
    g_SqlTuple = SQL_MakeDbTuple("", "", "", "");
    new ErrorCode = 0;
    new Handle:SqlConnection = SQL_Connect(g_SqlTuple, ErrorCode, g_Error, 511);
    if (!SqlConnection)
    {
        set_fail_state(g_Error);
    }
    SQL_FreeHandle(SqlConnection);
    Load_MySql();
    return 0;
}

public plugin_end()
{
    SQL_FreeHandle(g_SqlTuple);
    return 0;
}

public Load_MySql()
{
    new szTemp[512];
    new Data[1];
    format(szTemp, 511, "SELECT * FROM `csgo_license` WHERE (`server_ip` = '%s')", "ip server");
    SQL_ThreadQuery(g_SqlTuple, "register_client", szTemp, Data, 1);
    return 0;
}

public register_client(FailState, Handle:Query, Error[], Errcode, Data[], DataSize)
{
	if (FailState == -2)
	{
		log_amx("Load - Could not connect to SQL database.  [%d] %s", Errcode, Error);
	}
	else
	{
		if (FailState == -1)
		{
			log_amx("Load Query failed. [%d] %s", Errcode, Error);
		}
	}
	if (1 > SQL_NumResults(Query))
	{
		hasLicense = 0;
	}
	else
	{
		hasLicense = 1;
	}
	return 1;
}

public IgnoreHandle(FailState, Handle:Query, String:Error[], Errcode, String:Data[], DataSize)
{
    SQL_FreeHandle(Query);
    return 1;
}

public native_e6117f86f7fcfc7465552067c8491139()
{
    return hasLicense;
}

public deb(id)
{
    client_print(id, print_chat, "%s %d", "ip server", hasLicense);
    return 0;
}
) si cand dau sa compilez plugin-ul primesc acest warning " warning 200: symbol "native_e6117f86f7fcfc7465552067" is truncated to 31 characters" la aceasta functie

public native_e6117f86f7fcfc7465552067c8491139()
{
return hasLicense;
}

Problema este urmatoarea, din cate am inteles acest warning apare din cauza ca functia respectiva depaseste 31 de caractere astefel micsoreaza acea functie ca sa nu mai dea acel warning. Din cauza acestui warning cand adaug pe server antilicenta primesc urmatoarea eroare in log-ul server-ului:

L 01/22/2019 - 19:16:29: Function "native_e6117f86f7fcfc7465552067c8491139" was not found
L 01/22/2019 - 19:16:29: [AMXX] Run time error 19 (plugin "csgo_license.amxx") - debug not enabled!
L 01/22/2019 - 19:16:29: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 01/22/2019 - 19:16:29: [AMXX] Run time error -1 (plugin "csgo_license.amxx") - debug not enabled!

Intrebarea mea este daca pot face cumva sa compilez plugin-ul respectiv fara sa mai dea acel warning (daca se poate marii cumva acea restrictie(mentionez ca am compilat pe localhost)).

Multumesc mult.
eXtreamSHOP
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2311
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 33 times
Been thanked: 365 times
Contact:

23 Jan 2019, 11:58

Code: Select all

#include <amxmodx>
#include <sqlx>

new Handle:g_SqlTuple;
new hasLicense;
new g_Error[512];

public plugin_init()
{
    register_plugin("CSGO License", "1.0", "SideWinder");
}

public plugin_precache()
{
    MySql_Init();
}

public plugin_natives()
{
    register_native("e6117f86f7fcfc7465552067c8491139", "native_x");
}

public MySql_Init()
{
    g_SqlTuple = SQL_MakeDbTuple("", "", "", "");
    new ErrorCode = 0;
    new Handle:SqlConnection = SQL_Connect(g_SqlTuple, ErrorCode, g_Error, 511);
    if (!SqlConnection)
    {
        set_fail_state(g_Error);
    }
    SQL_FreeHandle(SqlConnection);
    Load_MySql();
}

public plugin_end()
{
    SQL_FreeHandle(g_SqlTuple);
}

public Load_MySql()
{
    new szTemp[512];
    new Data[1];
    format(szTemp, 511, "SELECT * FROM `csgo_license` WHERE (`server_ip` = '%s')", "ip server");
    SQL_ThreadQuery(g_SqlTuple, "register_client", szTemp, Data, 1);
}

public register_client(FailState, Handle:Query, Error[], Errcode, Data[], DataSize)
{
	if (FailState == -2)
	{
		log_amx("Load - Could not connect to SQL database.  [%d] %s", Errcode, Error);
	}
	else
	{
		if (FailState == -1)
		{
			log_amx("Load Query failed. [%d] %s", Errcode, Error);
		}
	}
	if (1 > SQL_NumResults(Query))
	{
		hasLicense = 0;
	}
	else
	{
		hasLicense = 1;
	}
	return 1;
}

public IgnoreHandle(FailState, Handle:Query, String:Error[], Errcode, String:Data[], DataSize)
{
    SQL_FreeHandle(Query);
    return 1;
}

public native_x()
{
    return hasLicense;
}

public deb(id)
{
    client_print(id, print_chat, "%s %d", "ip server", hasLicense);
}
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Reycku
Membru, skill 0
Membru, skill 0
Posts: 64
Joined: 26 Jan 2019, 02:11
Detinator Steam: Da
Detinator server CS: Da
SteamID: reyck
Fond eXtream: 0
Been thanked: 2 times
Contact:

14 Aug 2019, 11:23

Plugin-ul ruleaza ...dar nu functioneaza meniul...
Am pus ce a dat LEVIN
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests