#include <amxmodx>
#include <amxmisc>
#include <cstrike>
//Необходимые сonst для разных предназначений
new const PLUGIN[] = "Spec";
new const VERSION[] = "1.0";
new const AUTHOR[] = "wellasgood"; //-_-
new const ACCESS_FLAG = ADMIN_CFG; //игрок только с этим флагом сможет использовать команду.
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /spec", "funcallspec");
}
public funcallspec(id){
if(get_user_flags(id) & ACCESS_FLAG){
new iGamer[MAX_PLAYERS], iCount;
get_players_ex(iGamer, iCount, GetPlayers_ExcludeDead|GetPlayers_ExcludeBots|GetPlayers_ExcludeHLTV);
for(new i; i < iCount; i++){
cs_set_user_team(iGamer[i], CS_TEAM_SPECTATOR, 0);
}
}
}
public funcallspec(id){
if(get_user_flags(id) & ACCESS_FLAG){
new iGamer[MAX_PLAYERS], iCount;
get_players_ex(iGamer, iCount, GetPlayers_ExcludeDead|GetPlayers_ExcludeBots|GetPlayers_ExcludeHLTV);
for(new i; i < iCount; i++){
user_kill(iGamer[i], 1);
cs_set_user_team(iGamer[i], CS_TEAM_SPECTATOR, 0);
}
}
}
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
//Необходимые сonst для разных предназначений
new const PLUGIN[] = "Spec";
new const VERSION[] = "1.0";
new const AUTHOR[] = "wellasgood"; //-_-
new const ACCESS_FLAG = ADMIN_CFG; //игрок только с этим флагом сможет использовать команду.
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /spec", "funcallspec");
}
public funcallspec(id){
if(get_user_flags(id) & ACCESS_FLAG){
new iGamer[MAX_PLAYERS], iCount;
get_players_ex(iGamer, iCount, GetPlayers_ExcludeDead|GetPlayers_ExcludeBots|GetPlayers_ExcludeHLTV);
for(new i; i < iCount; i++){
if(iGamer[i] != id){
user_kill(iGamer[i], 1);
cs_set_user_team(iGamer[i], CS_TEAM_SPECTATOR, 0);
}
}
}
}
#include <amxmodx>
#include <amxmisc>
#include <reapi>
new const PLUGIN_NAME[] = "Transfer to Other Team";
new const PLUGIN_VERSION[] = "1.0.0";
new const PLUGIN_AUTHOR[] = "w0w";
/****************************************************************************************
****************************************************************************************/
enum _:CVARS
{
CVAR_YOURSELF,
TeamName:CVAR_TEAM_TO,
CVAR_TEAM_WHO,
CVAR_BOT_SUPPORT,
CVAR_SILENT_KILL
};
new g_eCvar[CVARS];
public plugin_init()
{
register_plugin(
.plugin_name = PLUGIN_NAME,
.version = PLUGIN_VERSION,
.author = PLUGIN_AUTHOR);
register_dictionary("transfer_to_other_team.txt");
register_clcmd("say /transfer", "func_TransferToOtherTeam", ADMIN_RCON);
register_clcmd("say_team /transfer", "func_TransferToOtherTeam", ADMIN_RCON);
register_concmd("transfer_to_other_team", "func_TransferToOtherTeam", ADMIN_RCON);
func_RegisterCvars();
}
public func_TransferToOtherTeam(const id, iAccess, iCommand)
{
if(!cmd_access(id, iAccess, iCommand, 0))
return PLUGIN_HANDLED;
new iCount;
for(new i = 1; i <= MaxClients; i++)
{
if(!is_user_connected(i) || is_user_hltv(i))
continue;
new TeamName:iTeam = get_member(i, m_iTeam);
if(iTeam == g_eCvar[CVAR_TEAM_TO])
continue;
if(g_eCvar[CVAR_TEAM_WHO] == 1 && iTeam == TEAM_TERRORIST)
continue;
else if(g_eCvar[CVAR_TEAM_WHO] == 2 && iTeam == TEAM_CT)
continue;
else if(g_eCvar[CVAR_TEAM_WHO] == 3 && iTeam == TEAM_SPECTATOR)
if(!g_eCvar[CVAR_YOURSELF] && id == i)
continue;
if(!g_eCvar[CVAR_BOT_SUPPORT] && is_user_bot(i))
continue;
rg_set_user_team(i, g_eCvar[CVAR_TEAM_TO], .check_win_conditions = true);
user_kill(i, g_eCvar[CVAR_SILENT_KILL]);
iCount++;
}
if(id && iCount)
client_print_color(0, print_team_default, "%l", "TTOT_CHAT_MSG", id);
return PLUGIN_HANDLED;
}
func_RegisterCvars()
{
new pCvar;
pCvar = create_cvar("ttot_yourself", "1", FCVAR_NONE, fmt("%L", LANG_SERVER, "TTOT_CVAR_YOURSELF"), true, 0.0, true, 1.0);
bind_pcvar_num(pCvar, g_eCvar[CVAR_YOURSELF]);
pCvar = create_cvar("ttot_team_to", "3", FCVAR_NONE, fmt("%L", LANG_SERVER, "TTOT_CVAR_TEAM_TO"), true, 1.0, true, 3.0);
bind_pcvar_num(pCvar, g_eCvar[CVAR_TEAM_TO]);
pCvar = create_cvar("ttot_team_who", "4", FCVAR_NONE, fmt("%L", LANG_SERVER, "TTOT_CVAR_TEAM_WHO"), true, 1.0, true, 4.0);
bind_pcvar_num(pCvar, g_eCvar[CVAR_TEAM_WHO]);
pCvar = create_cvar("ttot_bot_support", "0", FCVAR_NONE, fmt("%L", LANG_SERVER, "TTOT_CVAR_BOT_SUPPORT"), true, 0.0, true, 1.0);
bind_pcvar_num(pCvar, g_eCvar[CVAR_BOT_SUPPORT]);
pCvar = create_cvar("ttot_silent_kill", "1", FCVAR_NONE, fmt("%L", LANG_SERVER, "TTOT_CVAR_SILENT_KILL"), true, 0.0, true, 1.0);
bind_pcvar_num(pCvar, g_eCvar[CVAR_SILENT_KILL]);
AutoExecConfig(true, "transfer_to_other_team");
}
[ru]
TTOT_CHAT_MSG = ^4* ^3%n ^1перевел(а) игроков за другую команду
TTOT_CVAR_YOURSELF = Переводить того кто использовал команду^n0 - выкл.^n1 - вкл.
TTOT_CVAR_TEAM_TO = В какую команду переводить^n1 - террористы^n2 - контр-террористы^n3 - наблюдатели
TTOT_CVAR_TEAM_WHO = Кого переводить^n1 - террористов^n2 - контр-террористов^n3 - наблюдателей^n4 - всех
TTOT_CVAR_BOT_SUPPORT = Перевод ботов^n0 - выкл.^n1 - вкл.
TTOT_CVAR_SILENT_KILL = Бесшумное убийство (сообщение вверху справа)^n0 - выкл.^n1 - вкл.