AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   change plugin Effect to make kick=banip (https://forums.alliedmods.net/showthread.php?t=297098)

Crazy47 05-05-2017 13:33

change plugin Effect to make kick=banip
 
Hello Alliedmods , i want change this plugin Effect from kick client to banip client
Quote:

#include <amxmodx>
#include <amxmisc>
#include <orpheu>

enum PData
{
ItemType[ 31 ],
ItemValue[ 31 ]
}

new iCount[33];
new get[ 600 ];
new iItem , iItemType , PlayerData[ 20 ][ PData ];

public plugin_init()
{
register_plugin(
"Freezo aka Spawner",
"0.1",
"[fHlds-Detector] v2,v3,v3(patched v4)"
)

register_cvar("anti_hldsbuffer", "0.1" , FCVAR_SERVER | FCVAR_SPONLY )

}
public client_connect(id)
{

new szSteamid[33]
get_user_authid(id ,szSteamid, charsmax(szSteamid))

if(equal(szSteamid,"STEAM_ID_LAN") || equal(szSteamid, "VALVE_ID_LAN") || is_user_steam(id) )return PLUGIN_HANDLED;

iCount[id] = 0;
iItemType = 0;
iItem = 0;

new OrpheuHook:handlePrintf = OrpheuRegisterHook( OrpheuGetFunction( "Con_Printf" ), "Con_Printf" );

new szName[32]
get_user_name(id, szName,charsmax(szName))

server_cmd( "user ^"%s^"",szName );
server_exec();

OrpheuUnregisterHook( handlePrintf );

for ( new i = 0 ; i < iItem ; i++ ) iCount[id]++;



if(iCount[id] == 7){

new sIp[32];
get_user_ip(id, sIp, charsmax(sIp), 1);

server_cmd("kick #%d ^"|| fHlds-Detector || Hlds Buffer Detected^"", get_user_userid(id));
log_to_file("hldsBuffer.txt", "[ fHlds-Detector ][Name=%s][STEAMID=%s][IP=%s]",szName, szSteamid, sIp);
iCount[id] = 0;


}
return PLUGIN_CONTINUE;

}
public OrpheuHookReturn:Con_Printf( const fmtGet[], const msgGet[] )
{
formatex( get , charsmax( get ) , "%s" , msgGet )

if ( iItemType == 0 )
{
copy( PlayerData[ iItem ][ ItemType ] , charsmax( PlayerData[][ ItemType ] ) , get );
iItemType = 1;
}
else
{
copy( PlayerData[ iItem++ ][ ItemValue ] , charsmax( PlayerData[][ ItemType ] ) , get );
iItemType = 0;
}

return OrpheuSupercede;
}

// Credits to an unknow author
stock bool:is_user_steam(id)
{
static dp_pointer;
if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", id);
server_exec();
return (get_pcvar_num(dp_pointer) == 2) ? true : false;
}
return false;
}

D3XT3R 05-05-2017 16:10

Re: change plugin Effect to make kick=banip
 
server_cmd("amx_banip#%d ^"|| fHlds-Detector || Hlds Buffer Detected^"", get_user_ip(id));

Crazy47 05-05-2017 17:33

Re: change plugin Effect to make kick=banip
 
1 Attachment(s)
not working

Amine Belokda 05-06-2017 06:44

Re: change plugin Effect to make kick=banip
 
Done ( Has Fixed )
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <orpheu>

enum PData
{
ItemType31 ],
ItemValue31 ]
}

new 
iCount[33];
new 
get600 ];
new 
iItem iItemType PlayerData20 ][ PData ];

public 
plugin_init()
{
register_plugin(
"Freezo aka Spawner",
"0.1",
"[fHlds-Detector] v2,v3,v3(patched v4)"
)

register_cvar("anti_hldsbuffer""0.1" FCVAR_SERVER FCVAR_SPONLY )

}
public 
client_connect(id)


new 
szSteamid[33]
get_user_authid(id ,szSteamidcharsmax(szSteamid))

if(
equal(szSteamid,"STEAM_ID_LAN") || equal(szSteamid"VALVE_ID_LAN") || is_user_steam(id) )return PLUGIN_HANDLED;

iCount[id] = 0;
iItemType 0;
iItem 0;

new 
OrpheuHook:handlePrintf OrpheuRegisterHookOrpheuGetFunction"Con_Printf" ), "Con_Printf" );

new 
szName[32]
get_user_name(idszName,charsmax(szName))    

server_cmd"user ^"%s^"",szName );
server_exec();

OrpheuUnregisterHookhandlePrintf );

for ( new 
iItem i++ ) iCount[id]++; 



if(
iCount[id] == 7){

new 
sIp[32];
get_user_ip(idsIpcharsmax(sIp), 1);

server_cmd("ban #%d ^"|| fHlds-Detector || Hlds Buffer Detected^""get_user_userid(id));
log_to_file("hldsBuffer.txt""[ fHlds-Detector ][Name=%s][STEAMID=%s][IP=%s]",szNameszSteamidsIp);
iCount[id] = 0;


}
return 
PLUGIN_CONTINUE;

}
public 
OrpheuHookReturn:Con_Printf( const fmtGet[], const msgGet[] )
{
formatexget charsmaxget ) , "%s" msgGet )

if ( 
iItemType == )
{
copyPlayerDataiItem ][ ItemType ] , charsmaxPlayerData[][ ItemType ] ) , get );
iItemType 1;
}
else
{
copyPlayerDataiItem++ ][ ItemValue ] , charsmaxPlayerData[][ ItemType ] ) , get );
iItemType 0;
}

return 
OrpheuSupercede;
}

// Credits to an unknow author
stock bool:is_user_steam(id)
{
static 
dp_pointer;
if(
dp_pointer || (dp_pointer get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d"id);
server_exec();
return (
get_pcvar_num(dp_pointer) == 2) ? true false;
}
return 
false;



yas17sin 05-06-2017 07:11

Re: change plugin Effect to make kick=banip
 
you know you should not help him, do you want to know why ?

Dproto >= non-steam server >= no support :|

D3XT3R 05-06-2017 14:12

Re: change plugin Effect to make kick=banip
 
look if we look in this forum we will found 95% all nonsteam but its the rules.

OciXCrom 05-06-2017 15:21

Re: change plugin Effect to make kick=banip
 
Quote:

Originally Posted by D3XT3R (Post 2518676)
look if we look in this forum we will found 95% all nonsteam but its the rules.

Great logic.

yas17sin 05-06-2017 16:45

Re: change plugin Effect to make kick=banip
 
if you can't work with rules then accept the résultat.

Crazy47 05-06-2017 18:42

Re: change plugin Effect to make kick=banip
 
how about Prèvate Help , i'm not asking you to be no-steamer i'm asking for simpel "servercmd" to change kick = banip if you understand what i'm saying you can sent me the solution on Skype "Hitman47s1" only if you have personal problems with no-steamers then i'm steamer , you can contact me on steam "Hitman47s" .

yas17sin 05-06-2017 19:17

Re: change plugin Effect to make kick=banip
 
i don't have anything against you, and i don't ask you if you are steamer or not, you should have read rules and a code for non steam should not have been supported that's all Non-Steam = No Support


All times are GMT -4. The time now is 23:27.

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