Cerere plugin anti overflow

Cereri de resurse: addons-uri, modele, sunete, etc.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

27 Apr 2018, 17:57

Salut! Doresc si eu un plugin anti overflow..Tin sa mentionez ca pe server ruleaza addonsul furien 4.0 al lui Aragon si ca am decat 5 mesaje in ad_manager.
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
eXtreamSHOP
User avatar
faKe91
Moderator ajutator
Moderator ajutator
Posts: 1406
Joined: 07 Oct 2014, 17:49
Detinator Steam: Da
CS Status: I <3 Heavy Metal
SteamID: dogseatmypancreas
Reputatie: Moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Location: Republica Moldova, Chișinău
Has thanked: 5 times
Been thanked: 6 times

27 Apr 2018, 20:21

Nu exista asa ceva. Poti doar ascunde mesajele de overflow din consola. Jucatorii oricum vor primi overflow, daca au de primit. Faci hook pe functia SV_DropClient folosind orpheu. Ar mai fi o idee sa trimiti clientului comanda "retry" dupa ce acesta a primit overflow, insa functia client_cmd e practic blocata de toate guardurile. Deci e inutil. Raman doar jucatorii steam carora le poti trimite comanda "retry" cu svc_director.
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

27 Apr 2018, 21:44

Am rehlds deci abandonam ideea cu orpheu...
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
User avatar
faKe91
Moderator ajutator
Moderator ajutator
Posts: 1406
Joined: 07 Oct 2014, 17:49
Detinator Steam: Da
CS Status: I <3 Heavy Metal
SteamID: dogseatmypancreas
Reputatie: Moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Location: Republica Moldova, Chișinău
Has thanked: 5 times
Been thanked: 6 times

27 Apr 2018, 23:09

Vei avea nevoie de modului reapi
https://github.com/s1lentq/reapi/blob/3 ... st.inc#L37
| Afiseaza codul
[code]#include <amxmodx>
#include <reapi>

#define RETRY_ON_KICK // Daca nu vrei ca jucatorii care primesc overflow sa se reconecteze (retry), atunci comenteaza aceasta linie

enum CVAR
{
	CVAR_MAX_WARNS,
	CVAR_RESET_TIME
};

new g_Cvars[CVAR] = {0, };

new g_PlayerWarns[33];

public plugin_init()
{
	register_plugin("Anti overflow", "1.0", "Some Author");

	g_Cvars[CVAR_MAX_WARNS] = register_cvar("amx_overflow_max_warns", "5");
	g_Cvars[CVAR_RESET_TIME] = register_cvar("amx_overflow_reset_time", "10");

	RegisterHookChain(RH_SV_DropClient, "SV_DropClient", false); 
}

public SV_DropClient(id, crash, const message[])
{	
	new ret = HC_CONTINUE;

	if(containi(message, "Reliable channel overflowed") != -1)
	{
		if(g_PlayerWarns[id]++ < get_pcvar_num(g_Cvars[CVAR_MAX_WARNS]))
		{
			if(task_exists(id))
				remove_task(id);
					
			set_task(get_pcvar_float(g_Cvars[CVAR_RESET_TIME]), "reset_warns", id);
				
			ret = HC_BREAK;
		}
		else
		{
#if defined RETRY_ON_KICK
            if(is_user_steam(id))
                send_director_cmd(id, "retry");
            else
                client_cmd(id, "retry");
#endif
			ret = HC_CONTINUE;
		}
	}
	return ret;
}

public reset_warns(id)
	g_PlayerWarns[id] = 0;

public client_connect(id)
	g_PlayerWarns[id] = 0;

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}[/code]
Sunt 2 cvaruri:
1) amx_overflow_max_warns - numarul maxim de avertizari pentru overflow, dupa care jucatorul va fi deconectat de pe server
2) amx_overflow_reset_time - intervalul de timp in secunde, in care daca jucatorul nu mai primeste overflow, avertizarile se reseteaza

In caz ca e activat define-ul RETRY_ON_KICK in loc de kick se va executa comanda retry in consola jucatorului. Functioneaza doar pentru jucatorii steam, dupa cum am spus mai sus, pentru ca marea majoritate a guardurilor, blocheaza comanda retry. In caz ca nu ai nevoie de aceasta optiune, poti comenta define-ul cu //

Ca sa nu stai sa astepti pana cineva primeste overflow, uite aici un plugin care va da 100% overflow asupra celui care executa comanda amx_overflow. Executa comanda amx_overflow de X+1 ori in consola ca sa vezi rezultatul, unde X e valoarea cvarului amx_overflow_max_warns
| Afiseaza codul
[code]#include <amxmodx>

public plugin_init()
{
	register_plugin("Overflow Me", "1.0", "Some Author");

	register_clcmd("amx_overflow", "please_overflow_me");
}

public please_overflow_me(id)
{   
	for(new i = 0; i < 10000; ++i)
	{
		message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
		write_byte(id);
		write_string("Hello World! ^1Hello World");
		message_end();
	}
}
[/code]
User avatar
faKe91
Moderator ajutator
Moderator ajutator
Posts: 1406
Joined: 07 Oct 2014, 17:49
Detinator Steam: Da
CS Status: I <3 Heavy Metal
SteamID: dogseatmypancreas
Reputatie: Moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Location: Republica Moldova, Chișinău
Has thanked: 5 times
Been thanked: 6 times

28 Apr 2018, 09:05

Varianta pentru hlds cu orpheu
| Afiseaza codul
[code]#include <amxmodx>
#include <fakemeta>
#include <orpheu>

#define RETRY_ON_KICK // Daca nu vrei ca jucatorii care primesc overflow sa se reconecteze pe server (retry), atunci comenteaza aceasta linie

enum CVAR
{
	CVAR_MAX_WARNS,
	CVAR_RESET_TIME
};

new g_Cvars[CVAR] = {0, };

new g_ClientPtr, g_ElementSize, g_EntityOffset;

new g_PlayerWarns[33];
new g_DisconnectForward;

public plugin_init()
{
	register_plugin("Anti overflow", "1.0", "Some Author");

	g_Cvars[CVAR_MAX_WARNS] = register_cvar("amx_overflow_max_warns", "5");
	g_Cvars[CVAR_RESET_TIME] = register_cvar("amx_overflow_reset_time", "10");

	OrpheuRegisterHook(OrpheuGetFunction("SV_DropClient"), "SV_DropClient", OrpheuHookPre);	
	g_DisconnectForward = register_forward(FM_ClientDisconnect, "ClientDisconnect");	
}

public OrpheuHookReturn:SV_DropClient(clientPtr, crash, const message[]) 
{
	new ret = _:OrpheuIgnored;

	if(g_ElementSize && g_EntityOffset)
	{
		if(containi(message, "Reliable channel overflowed") != -1)
		{
			new id = (clientPtr - g_EntityOffset) / g_ElementSize;

			if(g_PlayerWarns[id]++ < get_pcvar_num(g_Cvars[CVAR_MAX_WARNS]))
			{
				if(task_exists(id))
					remove_task(id);
					
				set_task(get_pcvar_float(g_Cvars[CVAR_RESET_TIME]), "reset_warns", id);
				
				ret = _:OrpheuSupercede;
			}
			else
			{
#if defined RETRY_ON_KICK
                if(is_user_steam(id))
                    send_director_cmd(id, "retry");
                else
                    client_cmd(id, "retry");
#endif
				ret = _:OrpheuIgnored;
			}
		}
	}		
	else
	{
		if(containi(message, "Reliable channel overflowed") != -1)
			ret = _:OrpheuSupercede;

		g_ClientPtr = clientPtr;
	}

	return OrpheuHookReturn:ret;
}

public reset_warns(id)
	g_PlayerWarns[id] = 0;

public client_connect(id)
	g_PlayerWarns[id] = 0;

public ClientDisconnect(id)
{
	static entityId = 0, lastPointer = 0;
	
	if(g_ClientPtr)
	{
		if(entityId && entityId != id)
		{
			g_ElementSize = abs((g_ClientPtr - lastPointer) / (id - entityId));
			g_EntityOffset = abs(g_ClientPtr - (id * g_ElementSize));
			
			unregister_forward(FM_ClientDisconnect, g_DisconnectForward);
		}
		else
		{
			lastPointer = g_ClientPtr;
			entityId = id;
		}
	}
}

#if defined RETRY_ON_KICK
stock bool:is_user_steam(id)
{
    static iPointer;
    if(iPointer || (iPointer = get_cvar_pointer("dp_r_id_provider")))
    {
        server_cmd("dp_clientinfo %d", id);
        server_exec();
        
        return (get_pcvar_num(iPointer) == 2);
    }
    
    return false;
}

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}
#endif[/code]
SV_DropClient | Afiseaza codul
[code]{
    "name" : "SV_DropClient",
    "library" : "engine",
    "arguments" :
    [
        {
            "type" : "int"
        },
        {
            "type" : "int"
        },
        {
            "type" : "char *"
        }
    ],
    "identifiers":
    [
        {
            "os" : "windows",
            "mod" : "cstrike",
            "value" : [0x55,0x8B,"*",0x81,"*","*","*","*","*",0x8B,0x4D,"*",0x53,0x56,0x8D,0x45,"*",0x57,0x50,0x51,0x8D,0x95]
        },
        {
            "os"    : "linux",
            "mod"   : "cstrike",
            "value" : "SV_DropClient"
        }
    ]
}
[/code]
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

01 May 2018, 12:52

faKe91 wrote:Vei avea nevoie de modului reapi
https://github.com/s1lentq/reapi/blob/3 ... st.inc#L37
| Afiseaza codul
[code]#include <amxmodx>
#include <reapi>

#define RETRY_ON_KICK // Daca nu vrei ca jucatorii care primesc overflow sa se reconecteze (retry), atunci comenteaza aceasta linie

enum CVAR
{
	CVAR_MAX_WARNS,
	CVAR_RESET_TIME
};

new g_Cvars[CVAR] = {0, };

new g_PlayerWarns[33];

public plugin_init()
{
	register_plugin("Anti overflow", "1.0", "Some Author");

	g_Cvars[CVAR_MAX_WARNS] = register_cvar("amx_overflow_max_warns", "5");
	g_Cvars[CVAR_RESET_TIME] = register_cvar("amx_overflow_reset_time", "10");

	RegisterHookChain(RH_SV_DropClient, "SV_DropClient", false); 
}

public SV_DropClient(id, crash, const message[])
{	
	new ret = HC_CONTINUE;

	if(containi(message, "Reliable channel overflowed") != -1)
	{
		if(g_PlayerWarns[id]++ < get_pcvar_num(g_Cvars[CVAR_MAX_WARNS]))
		{
			if(task_exists(id))
				remove_task(id);
					
			set_task(get_pcvar_float(g_Cvars[CVAR_RESET_TIME]), "reset_warns", id);
				
			ret = HC_BREAK;
		}
		else
		{
#if defined RETRY_ON_KICK
            if(is_user_steam(id))
                send_director_cmd(id, "retry");
            else
                client_cmd(id, "retry");
#endif
			ret = HC_CONTINUE;
		}
	}
	return ret;
}

public reset_warns(id)
	g_PlayerWarns[id] = 0;

public client_connect(id)
	g_PlayerWarns[id] = 0;

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}[/code]
Sunt 2 cvaruri:
1) amx_overflow_max_warns - numarul maxim de avertizari pentru overflow, dupa care jucatorul va fi deconectat de pe server
2) amx_overflow_reset_time - intervalul de timp in secunde, in care daca jucatorul nu mai primeste overflow, avertizarile se reseteaza

In caz ca e activat define-ul RETRY_ON_KICK in loc de kick se va executa comanda retry in consola jucatorului. Functioneaza doar pentru jucatorii steam, dupa cum am spus mai sus, pentru ca marea majoritate a guardurilor, blocheaza comanda retry. In caz ca nu ai nevoie de aceasta optiune, poti comenta define-ul cu //

Ca sa nu stai sa astepti pana cineva primeste overflow, uite aici un plugin care va da 100% overflow asupra celui care executa comanda amx_overflow. Executa comanda amx_overflow de X+1 ori in consola ca sa vezi rezultatul, unde X e valoarea cvarului amx_overflow_max_warns
| Afiseaza codul
[code]#include <amxmodx>

public plugin_init()
{
	register_plugin("Overflow Me", "1.0", "Some Author");

	register_clcmd("amx_overflow", "please_overflow_me");
}

public please_overflow_me(id)
{   
	for(new i = 0; i < 10000; ++i)
	{
		message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
		write_byte(id);
		write_string("Hello World! ^1Hello World");
		message_end();
	}
}
[/code]
Eroare la compilare:

Code: Select all

 antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"

1 Error.
Compilarea a esuat!
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
User avatar
YONTU
Moderator ajutator
Moderator ajutator
Posts: 2480
Joined: 10 May 2013, 13:25
Detinator Steam: Nu
CS Status: Everyone is looking at ur shoes
Reputatie: Moderator ajutator
Fost scripter eXtreamCS
Location: Gura Humorului
Has thanked: 260 times
Been thanked: 279 times
Contact:

01 May 2018, 13:52

Astaroth wrote:
faKe91 wrote:Vei avea nevoie de modului reapi
https://github.com/s1lentq/reapi/blob/3 ... st.inc#L37
| Afiseaza codul
[code]#include <amxmodx>
#include <reapi>

#define RETRY_ON_KICK // Daca nu vrei ca jucatorii care primesc overflow sa se reconecteze (retry), atunci comenteaza aceasta linie

enum CVAR
{
	CVAR_MAX_WARNS,
	CVAR_RESET_TIME
};

new g_Cvars[CVAR] = {0, };

new g_PlayerWarns[33];

public plugin_init()
{
	register_plugin("Anti overflow", "1.0", "Some Author");

	g_Cvars[CVAR_MAX_WARNS] = register_cvar("amx_overflow_max_warns", "5");
	g_Cvars[CVAR_RESET_TIME] = register_cvar("amx_overflow_reset_time", "10");

	RegisterHookChain(RH_SV_DropClient, "SV_DropClient", false); 
}

public SV_DropClient(id, crash, const message[])
{	
	new ret = HC_CONTINUE;

	if(containi(message, "Reliable channel overflowed") != -1)
	{
		if(g_PlayerWarns[id]++ < get_pcvar_num(g_Cvars[CVAR_MAX_WARNS]))
		{
			if(task_exists(id))
				remove_task(id);
					
			set_task(get_pcvar_float(g_Cvars[CVAR_RESET_TIME]), "reset_warns", id);
				
			ret = HC_BREAK;
		}
		else
		{
#if defined RETRY_ON_KICK
            if(is_user_steam(id))
                send_director_cmd(id, "retry");
            else
                client_cmd(id, "retry");
#endif
			ret = HC_CONTINUE;
		}
	}
	return ret;
}

public reset_warns(id)
	g_PlayerWarns[id] = 0;

public client_connect(id)
	g_PlayerWarns[id] = 0;

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}[/code]
Sunt 2 cvaruri:
1) amx_overflow_max_warns - numarul maxim de avertizari pentru overflow, dupa care jucatorul va fi deconectat de pe server
2) amx_overflow_reset_time - intervalul de timp in secunde, in care daca jucatorul nu mai primeste overflow, avertizarile se reseteaza

In caz ca e activat define-ul RETRY_ON_KICK in loc de kick se va executa comanda retry in consola jucatorului. Functioneaza doar pentru jucatorii steam, dupa cum am spus mai sus, pentru ca marea majoritate a guardurilor, blocheaza comanda retry. In caz ca nu ai nevoie de aceasta optiune, poti comenta define-ul cu //

Ca sa nu stai sa astepti pana cineva primeste overflow, uite aici un plugin care va da 100% overflow asupra celui care executa comanda amx_overflow. Executa comanda amx_overflow de X+1 ori in consola ca sa vezi rezultatul, unde X e valoarea cvarului amx_overflow_max_warns
| Afiseaza codul
[code]#include <amxmodx>

public plugin_init()
{
	register_plugin("Overflow Me", "1.0", "Some Author");

	register_clcmd("amx_overflow", "please_overflow_me");
}

public please_overflow_me(id)
{   
	for(new i = 0; i < 10000; ++i)
	{
		message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
		write_byte(id);
		write_string("Hello World! ^1Hello World");
		message_end();
	}
}
[/code]
Eroare la compilare:

Code: Select all

 antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"

1 Error.
Compilarea a esuat!
Adauga codul de mai jos la finalul sursei tale:
| Afiseaza codul
#if defined RETRY_ON_KICK
stock bool:is_user_steam(id)
{
    static iPointer;
    if(iPointer || (iPointer = get_cvar_pointer("dp_r_id_provider")))
    {
        server_cmd("dp_clientinfo %d", id);
        server_exec();
        
        return (get_pcvar_num(iPointer) == 2);
    }
    
    return false;
}

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}
#endif
„Peste douăzeci de ani vei fi dezamăgit din cauza lucrurilor pe care nu le-ai făcut, nu din cauza celor pe care le-ai făcut.” - Mark Twain
„Asa e si in viata, hotii castiga, prostii care invata pierd.” - Mihai Nemeș
Pluginurile mele publice | Afiseaza codul
Control HE Damage(s)
[Zombie mod] Liderul oamenilor
NO RUSH (MANUAL)
Salvatorul Craciunului
Harry Potter's Magic Wand [0.0.3]
New HE Grenade Effects
Upgrades Menu -> Health/Armor/Damage
Serverele care au achizitonat pluginurile mele: #1 #2

CONTACT: sef_yontu@yahoo.com | skype: cyp_yontu
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

01 May 2018, 14:14

YONTU wrote: Adauga codul de mai jos la finalul sursei tale:
| Afiseaza codul
#if defined RETRY_ON_KICK
stock bool:is_user_steam(id)
{
    static iPointer;
    if(iPointer || (iPointer = get_cvar_pointer("dp_r_id_provider")))
    {
        server_cmd("dp_clientinfo %d", id);
        server_exec();
        
        return (get_pcvar_num(iPointer) == 2);
    }
    
    return false;
}

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}
#endif
9 erori..

Code: Select all

antioverflow.txt(44) : error 029: invalid expression, assumed zero
antioverflow.txt(44) : warning 221: label name "bool" shadows tag name
antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"
antioverflow.txt(58) : warning 225: unreachable code
antioverflow.txt(58) : error 029: invalid expression, assumed zero
antioverflow.txt(58) : error 017: undefined symbol "send_director_cmd"
antioverflow.txt(61) : error 017: undefined symbol "text"
antioverflow.txt(61) : error 001: expected token: ",", but found ";"
antioverflow.txt(63) : error 017: undefined symbol "text"
antioverflow.txt(63) : error 088: number of arguments does not match definition
antioverflow.txt(66) : error 001: expected token: "}", but found "-end of file-"

9 Errors.
Compilarea a esuat!
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
User avatar
faKe91
Moderator ajutator
Moderator ajutator
Posts: 1406
Joined: 07 Oct 2014, 17:49
Detinator Steam: Da
CS Status: I <3 Heavy Metal
SteamID: dogseatmypancreas
Reputatie: Moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
Location: Republica Moldova, Chișinău
Has thanked: 5 times
Been thanked: 6 times

01 May 2018, 18:24

YONTU wrote:
Astaroth wrote:
faKe91 wrote:Vei avea nevoie de modului reapi
https://github.com/s1lentq/reapi/blob/3 ... st.inc#L37
| Afiseaza codul
[code]#include <amxmodx>
#include <reapi>

#define RETRY_ON_KICK // Daca nu vrei ca jucatorii care primesc overflow sa se reconecteze (retry), atunci comenteaza aceasta linie

enum CVAR
{
	CVAR_MAX_WARNS,
	CVAR_RESET_TIME
};

new g_Cvars[CVAR] = {0, };

new g_PlayerWarns[33];

public plugin_init()
{
	register_plugin("Anti overflow", "1.0", "Some Author");

	g_Cvars[CVAR_MAX_WARNS] = register_cvar("amx_overflow_max_warns", "5");
	g_Cvars[CVAR_RESET_TIME] = register_cvar("amx_overflow_reset_time", "10");

	RegisterHookChain(RH_SV_DropClient, "SV_DropClient", false); 
}

public SV_DropClient(id, crash, const message[])
{	
	new ret = HC_CONTINUE;

	if(containi(message, "Reliable channel overflowed") != -1)
	{
		if(g_PlayerWarns[id]++ < get_pcvar_num(g_Cvars[CVAR_MAX_WARNS]))
		{
			if(task_exists(id))
				remove_task(id);
					
			set_task(get_pcvar_float(g_Cvars[CVAR_RESET_TIME]), "reset_warns", id);
				
			ret = HC_BREAK;
		}
		else
		{
#if defined RETRY_ON_KICK
            if(is_user_steam(id))
                send_director_cmd(id, "retry");
            else
                client_cmd(id, "retry");
#endif
			ret = HC_CONTINUE;
		}
	}
	return ret;
}

public reset_warns(id)
	g_PlayerWarns[id] = 0;

public client_connect(id)
	g_PlayerWarns[id] = 0;

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}[/code]
Sunt 2 cvaruri:
1) amx_overflow_max_warns - numarul maxim de avertizari pentru overflow, dupa care jucatorul va fi deconectat de pe server
2) amx_overflow_reset_time - intervalul de timp in secunde, in care daca jucatorul nu mai primeste overflow, avertizarile se reseteaza

In caz ca e activat define-ul RETRY_ON_KICK in loc de kick se va executa comanda retry in consola jucatorului. Functioneaza doar pentru jucatorii steam, dupa cum am spus mai sus, pentru ca marea majoritate a guardurilor, blocheaza comanda retry. In caz ca nu ai nevoie de aceasta optiune, poti comenta define-ul cu //

Ca sa nu stai sa astepti pana cineva primeste overflow, uite aici un plugin care va da 100% overflow asupra celui care executa comanda amx_overflow. Executa comanda amx_overflow de X+1 ori in consola ca sa vezi rezultatul, unde X e valoarea cvarului amx_overflow_max_warns
| Afiseaza codul
[code]#include <amxmodx>

public plugin_init()
{
	register_plugin("Overflow Me", "1.0", "Some Author");

	register_clcmd("amx_overflow", "please_overflow_me");
}

public please_overflow_me(id)
{   
	for(new i = 0; i < 10000; ++i)
	{
		message_begin(MSG_ONE, get_user_msgid("SayText"), _, id);
		write_byte(id);
		write_string("Hello World! ^1Hello World");
		message_end();
	}
}
[/code]
Eroare la compilare:

Code: Select all

 antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"

1 Error.
Compilarea a esuat!
Adauga codul de mai jos la finalul sursei tale:
| Afiseaza codul
#if defined RETRY_ON_KICK
stock bool:is_user_steam(id)
{
    static iPointer;
    if(iPointer || (iPointer = get_cvar_pointer("dp_r_id_provider")))
    {
        server_cmd("dp_clientinfo %d", id);
        server_exec();
        
        return (get_pcvar_num(iPointer) == 2);
    }
    
    return false;
}

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}
#endif
Nu e nevoie. https://github.com/s1lentq/reapi/blob/2 ... on.inc#L22
Astaroth wrote:
YONTU wrote: 9 erori..

Code: Select all

antioverflow.txt(44) : error 029: invalid expression, assumed zero
antioverflow.txt(44) : warning 221: label name "bool" shadows tag name
antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"
antioverflow.txt(58) : warning 225: unreachable code
antioverflow.txt(58) : error 029: invalid expression, assumed zero
antioverflow.txt(58) : error 017: undefined symbol "send_director_cmd"
antioverflow.txt(61) : error 017: undefined symbol "text"
antioverflow.txt(61) : error 001: expected token: ",", but found ";"
antioverflow.txt(63) : error 017: undefined symbol "text"
antioverflow.txt(63) : error 088: number of arguments does not match definition
antioverflow.txt(66) : error 001: expected token: "}", but found "-end of file-"

9 Errors.
Compilarea a esuat!
Se compileaza fara probleme http://funkyimg.com/i/2FLsJ.png. Adaoga include-urile modulului reapi. Pun pariu, compilezi fara ele https://www37.zippyshare.com/v/Ful75Aek/file.html

Nu compila online!
User avatar
4D61676973746572
Membru, skill 0
Membru, skill 0
Posts: 11
Joined: 19 Aug 2016, 13:10
Detinator Steam: Da
Detinator server CS: localhost
Fond eXtream: 0

01 May 2018, 19:44

faKe91 wrote:Nu exista asa ceva. Poti doar ascunde mesajele de overflow din consola. Jucatorii oricum vor primi overflow, daca au de primit. Faci hook pe functia SV_DropClient folosind orpheu. Ar mai fi o idee sa trimiti clientului comanda "retry" dupa ce acesta a primit overflow, insa functia client_cmd e practic blocata de toate guardurile. Deci e inutil. Raman doar jucatorii steam carora le poti trimite comanda "retry" cu svc_director.
Mai bine trimiti comanda "reconnect", asa comanda nu va mai fi blocata de majoritatea guardurilor.
User avatar
Astaroth
Membru, skill +1
Membru, skill +1
Posts: 140
Joined: 24 Aug 2017, 15:38
Detinator Steam: Da
CS Status: .....
Detinator server CS: FURIEN.FREAKZ.RO
SteamID: AstarothRTH
Fond eXtream: 0
Contact:

01 May 2018, 20:56

faKe91 wrote:
YONTU wrote:
Astaroth wrote:
Eroare la compilare:

Code: Select all

 antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"

1 Error.
Compilarea a esuat!
Adauga codul de mai jos la finalul sursei tale:
| Afiseaza codul
#if defined RETRY_ON_KICK
stock bool:is_user_steam(id)
{
    static iPointer;
    if(iPointer || (iPointer = get_cvar_pointer("dp_r_id_provider")))
    {
        server_cmd("dp_clientinfo %d", id);
        server_exec();
        
        return (get_pcvar_num(iPointer) == 2);
    }
    
    return false;
}

stock send_director_cmd(id, text[])
{
    message_begin(MSG_ONE, SVC_DIRECTOR, _, id);
    write_byte(strlen(text) + 2);
    write_byte(10);
    write_string(text);
    message_end();
}
#endif
Nu e nevoie. https://github.com/s1lentq/reapi/blob/2 ... on.inc#L22
Astaroth wrote:
YONTU wrote: 9 erori..

Code: Select all

antioverflow.txt(44) : error 029: invalid expression, assumed zero
antioverflow.txt(44) : warning 221: label name "bool" shadows tag name
antioverflow.txt(44) : error 017: undefined symbol "is_user_steam"
antioverflow.txt(58) : warning 225: unreachable code
antioverflow.txt(58) : error 029: invalid expression, assumed zero
antioverflow.txt(58) : error 017: undefined symbol "send_director_cmd"
antioverflow.txt(61) : error 017: undefined symbol "text"
antioverflow.txt(61) : error 001: expected token: ",", but found ";"
antioverflow.txt(63) : error 017: undefined symbol "text"
antioverflow.txt(63) : error 088: number of arguments does not match definition
antioverflow.txt(66) : error 001: expected token: "}", but found "-end of file-"

9 Errors.
Compilarea a esuat!
Se compileaza fara probleme http://funkyimg.com/i/2FLsJ.png. Adaoga include-urile modulului reapi. Pun pariu, compilezi fara ele https://www37.zippyshare.com/v/Ful75Aek/file.html

Nu compila online!
Done. L am compilat local si a functionat. Mersi frumos
<< Tranzactii efectuate cu succes >>

Code: Select all

1. https://www.extreamcs.com/forum/security-zone/astaroth-tepar-t347242.html 

Code: Select all

2.https://www.extreamcs.com/forum/anunturi/dau-paysafecard-paypal-t355179.html
Vand frustrat la 10 euro. Pret negociabil
cs_all wrote: Atunci o sa-mi pun si eu admini sa vina sa iti faca reclama si nu doar 1 :middle_finger:
| Afiseaza codul
furien.kniferz.ro server intretinut din tepe, good job cs_all aka "bani de boost"
http://www.extreamcs.com/forum/security ... 55999.html
http://www.extreamcs.com/forum/security ... 55873.html
http://www.extreamcs.com/forum/security ... 55993.html
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests