не работает баланс

Сообщения
137
Реакции
9
Помог
3 раз(а)
Ошибка
Не перебрасывает
ОС
Linux
Amx Mod X
AMX Mod X 1.10.0.5245 (http://www.amxmodx.org) 
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Jan 24 2019 12:14:55
Built from: https://github.com/alliedmodders/amxmodx/commit/ba083de
Build ID: 5245:ba083de
Core mode: JIT+ASM32
Билд
Protocol version 48 
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.668-dev
Build date: 09:47:42 Sep 29 2018 (1631)
Build from: https://github.com/dreamstalker/rehlds/commit/89be216
ReGamedll
ReGameDLL version: 5.7.0.322-dev 
Build date: 11:41:14 Jan 13 2019
Версия Metamod
Metamod-r v1.3.0.128, API (5:13) 
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.75 ini Start Never 
[ 2] AMX Mod X RUN - amxmodx_mm_i386.so v1.10.0.5245 ini Start ANY
[ 3] Revoice RUN - revoice_mm_i386.so v0.1.0.32 ini Start Never
[ 4] POD-Bot mm RUN - podbot_mm_i386.so vV3B22 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 6] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini Chlvl ANY
[ 8] MySQL RUN - mysql_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[ 9] SQLite RUN - sqlite_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[10] Fun RUN - fun_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[11] Engine RUN - engine_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[12] FakeMeta RUN - fakemeta_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[13] GeoIP RUN - geoip_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.10.0.5245 pl2 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386.so v5.8.0.163-dev pl2 ANY Never
17 plugins, 17 running
Список плагинов
[ 43] Deathtype Effects 1.0 anakin_cstrike deathtype_effec running 
[ 44] ScreenFade 1.0 Admin Fade_random.amx running
[ 45] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 46] Easy MultiJump 1.6 twistedeuphoria/ reapi_multijump running
[ 47] Parachute Lite [ReAPI] 11.0 Leo_[BH] parachute_lite. running
[ 48] Unlimited ChooseTeam ( 1.0 ConnorMcLeod & p live_to_spec.am running
[ 49] CSDM Auto Balance 1.1 incognito admin_balans.am running
[ 50] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 51] resetscore(ReAPI) 1.0 Phantom resetscore.amxx running
[ 52] Block Radio Commands 1.00 MaTTe radio_blok_tapa running
[ 53] Show timeleft for CSDM 1.0 neygomon timer.amxx running
[ 54] [ReAPI] Custom Models 1.6.1 neugomon custom_models.a running
[ 55] Weapon Model + Sound R 1.3 GHW_Chronic GHW_Weapon_Repl running
[ 56] Unlimited Bpammo 1.0 hlds.us patron.amxx running
[ 57] Auto-Give Privileges 1.0 SerGrib night_vips.amxx stopped
[ 58] Kill Rewards 1.6 HoLLyWooD kill_rewards.am running
[ 59] AMXX Gag 1.4.9 xPaw & Exolent amx_gag.amxx running
[ 60] Give ADMIN *SoNeeKkk SoNeeKK1 menu_donata.amx running
[ 61] Block Change Name 1.0 DJ_WEST block_change_na running
[ 62] unknown unknown unknown uron.amxx running
[ 63] Change Game Name 1.2 GoldSrc Team gamenamechanger running
[ 64] SF Warn Menu 0.1.4f serfreeman1337 sf_admin_warns. running
[ 65] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 66] Nice Kicker 2.0 sector nice_kicker.amx running
[ 67] [ReAPI] Top Awards 1.0 Dom1no_[KZ] Re_top_awards.a running
[ 68] unknown unknown unknown admchat.amxx running
[ 69] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 70] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 71] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 72] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 73] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 74] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 75] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 76] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 77] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 78] CSDM Core 0.1.0 wopox1337\Vaqtin csdm_core.amxx running
[ 79] CSDM Equip Manager 0.1.0 wopox1337\Vaqtin csdm_equip_mana running
[ 80] CSDM Map Cleaner 0.1.0 wopox1337\Vaqtin csdm_map_cleane running
[ 81] CSDM Misc 0.1.0 wopox1337\Vaqtin csdm_misc.amxx running
[ 82] CSDM Protection 0.1.0 wopox1337\Vaqtin csdm_protection running
[ 83] CSDM Spawn Manager 0.1.0 wopox1337\Vaqtin csdm_spawn_mana running
[ 84] V.I.P Custom Weapons 1.0.0 Vaqtincha vip_custom.amxx debug
[ 85] V.I.P Custom KNIFE 1.0.0 Vaqtincha custom_knife.am debug
[ 86] V.I.P Custom DEAGLE 1.0.0 TaPaHTyL custom_deagle.a debug
[ 87] V.I.P Custom M4A1 1.0.0 TaPaHTyL custom_m4a1.amx debug
[ 88] V.I.P Custom AK-47 1.0.0 TaPaHTyL custom_ak47.amx debug
[ 89] V.I.P Custom AWP 1.0.0 TaPaHTyL custom_awp.amxx debug
Автор плагина
мы
Версия плагина
1
Исходный код
#include <amxmodx>
#include <cstrike>
#include <csdm>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#else
#define DontChange print_team_default
#endif

new bool:g_bConnected[33], bool:g_bAdmin[33];
new g_iPlayers, CsTeams:g_iNewTeam[33];

public plugin_init()
register_plugin("CSDM Auto Balance", "1.1", "incognito");

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_RESERVATION )
g_bAdmin[id] = true;

g_iNewTeam[id] = CS_TEAM_UNASSIGNED;
g_bConnected[id] = true;
g_iPlayers++;
}

public client_disconnects(id)
{
g_bConnected[id] = g_bAdmin[id] = false;
g_iPlayers--;
}

public csdm_PostDeath(iKiller, id, HeadShot, const szWeapon[])
{
if(g_iPlayers < 4 || iKiller == id || !g_bConnected[id]) return;

set_task(0.5, "check_teams_and_transfer", id);
}

public csdm_PostSpawn(id, bool:bFake)
{
if(g_iNewTeam[id] > CS_TEAM_UNASSIGNED)
{
static szName[32]; get_user_name(id, szName, charsmax(szName));
client_print_color(0, DontChange, "^4[Balance] ^1%s ^3%s ^1был перемещен за команду ^3%s", g_bAdmin[id] ? "Админ" : "Игрок", szName, g_iNewTeam[id] == CS_TEAM_T ? "Террористов" : "Контр-Террористов");

static iMsgScreenFade;
if(!iMsgScreenFade) iMsgScreenFade = get_user_msgid("ScreenFade");
message_begin( MSG_ONE_UNRELIABLE, iMsgScreenFade, _, id );
write_short(2000);
write_short(2000);
write_short(0);
write_byte(g_iNewTeam[id] == CS_TEAM_T ? 175 : 0);
write_byte(0);
write_byte(g_iNewTeam[id] == CS_TEAM_CT ? 175 : 0);
write_byte(175);
message_end();

g_iNewTeam[id] = CS_TEAM_UNASSIGNED;
}
}

public check_teams_and_transfer(id)
{
static players[32], pnum, iNumCT, iNumTT;

if(g_bAdmin[id])
{
iNumCT = iNumTT = 0; get_players(players, pnum);
for(new i; i < pnum; i++)
{
if(!g_bAdmin[players[i]]) continue;
switch(cs_get_user_team(players[i]))
{
case CS_TEAM_T: iNumTT++;
case CS_TEAM_CT: iNumCT++;
}
}
}
else
{
get_players(players, iNumCT, "e", "CT");
get_players(players, iNumTT, "e", "TERRORIST");
}
OpersNumsPL(id, iNumCT, iNumTT);
}

OpersNumsPL(const id, const CT, const TT)
{
if(!is_user_connected(id))
return true

static CsTeams:NewTeam, iDiff; iDiff = CT - TT;

if(iDiff > 0) NewTeam = CS_TEAM_T;
else if(iDiff < 0) NewTeam = CS_TEAM_CT;
else return true;

if(abs(iDiff) >= 2 && cs_get_user_team(id) != NewTeam)
{
cs_set_user_team(id, NewTeam);
g_iNewTeam[id] = NewTeam;
}
return true
}
Здравствуйте. есть сервер стоит на 1.9.0 ставлю плагин туда все работает. ставлю плагин на этот не перекидывает игроков. сервера индетичны по плагинам. Правда версия csdm мода другая. но компилируеться
27 Фев 2019
Сервер без раундов. И в этом плагине перекидывало игроков определеного флага держало баланс админов и випов. Но и простых игроков перекидывало для баланса
 
В этой теме было размещено решение! Перейти к решению.
Сообщения
164
Реакции
13
Помог
2 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Проверьте квары в сервер кфг и регмдл или гейм кфг на первом (рабочем) сервере
А дальше на 2 сервере поставьте те же.
Плагин тут не виноват
28 Фев 2019
Да и не забудьте рестарт))
 
Сообщения
137
Реакции
9
Помог
3 раз(а)
csparena, Стоит все такое же server.cfg и game.cfg одинаковые. Я пробывал и амхх поставить тот же. но не работает почему то
28 Фев 2019
У меня есть подозрения про мод ксдм там инклуид csdm другой возможно.
28 Фев 2019
Здравствуйте решил установить этот плагин
Код:
#include <amxmodx>
#include <reapi>

#pragma semicolon 1


#if AMXX_VERSION_NUM < 183
    #define MAX_NAME_LENGTH 32
    #define client_disconnected client_disconnect
#endif


#define CHECK_TIME 30.0    // частота (в сек) проверка баланса
#define SCREEN_FADE        // экран исчезать в цвете игроков новой команды.
#define MSG_CENTER        // Screen center при передаче плеера.
//#define PLAY_SOUND        //  звук при передаче плеера. Звук такой же, как "бип".


new TeamName:g_teamBigger;
new TeamName:g_teamSmaller;

new g_bitsImmunity = ADMIN_IMMUNITY;
new g_iImmunitySteam = 1;
new bool:g_isBalancing = false;

stock const SOUND[] = "misc/mass_teleport_target.wav";


#if defined PLAY_SOUND

public plugin_precache()
{
    precache_sound(SOUND);
}

#endif


public plugin_init()
{
    register_plugin("ReCSDM Team Balance", "1.0.3", "the_hunter");

    register_event("TeamInfo", "event_team_info", "a", "1>0", "2!UNASSIGNED");
    RegisterHookChain(RG_CBasePlayer_Spawn, "fwd_player_spawn_post", true);

#if AMXX_VERSION_NUM < 183

    register_srvcmd("dmb_immunity_steam", "cmd_immunity_steam");
    register_srvcmd("dmb_immunity_flags", "cmd_immunity_flags");

#else

    new pcvImmunitySteam = create_cvar("dmb_immunity_steam", "1");
    new pcvImmunityFlags = create_cvar("dmb_immunity_flags", "a", FCVAR_NOEXTRAWHITEPACE);

    bind_pcvar_num(pcvImmunitySteam, g_iImmunitySteam);
    hook_cvar_change(pcvImmunityFlags, "cvar_change_callback");

#endif

    set_task(CHECK_TIME, "task_check_balance", .flags = "b");
}


/*************** CHECKS ***************/


public task_check_balance()
{
    new iTcount = get_member_game(m_iNumTerrorist);
    new iCTcount = get_member_game(m_iNumCT);
    new iLimitTeams = get_member_game(m_iLimitTeams);

    if (iLimitTeams && abs(iTcount - iCTcount) > iLimitTeams)
    {
        if (iTcount > iCTcount)
        {
            g_teamBigger = TEAM_TERRORIST;
            g_teamSmaller = TEAM_CT;
        }
        else
        {
            g_teamBigger = TEAM_CT;
            g_teamSmaller = TEAM_TERRORIST;
        }

        g_isBalancing = true;
    }
    else
    {
        g_isBalancing = false;
    }
}


bool:check_team(iPlayer)
{
    return
        get_member(iPlayer, m_iTeam) == g_teamBigger;
}


bool:check_immunity(iPlayer)
{
    return
        (get_user_flags(iPlayer) & g_bitsImmunity) ||
        (g_iImmunitySteam && is_user_steam(iPlayer));
}


/*************** FORWARDS ***************/


public event_team_info()
{
    if (g_isBalancing)
    {
        task_check_balance();
    }
}


public fwd_player_spawn_post(iPlayer)
{
    if (g_isBalancing && check_team(iPlayer) && !check_immunity(iPlayer))
    {
        new ModelName:model = get_opposite_player_model(iPlayer);

        if (rg_set_user_team(iPlayer, g_teamSmaller, model, true))
        {
            set_member(iPlayer, m_bTeamChanged, false);

            #if defined MSG_CENTER
            msg_center(iPlayer, g_teamSmaller);
            #endif

            #if defined SCREEN_FADE
            screen_fade(iPlayer, g_teamSmaller);
            #endif

            #if defined PLAY_SOUND
            util_send_audio(iPlayer, SOUND);
            #endif
        }
    }

    return HC_CONTINUE;
}


public client_disconnected()
{
    if (g_isBalancing)
    {
        task_check_balance();
    }

    return PLUGIN_CONTINUE;
}


/*************** BALANCE EFFECTS ***************/


stock msg_center(iPlayer, {_, TeamName}:team)
{
    static const szTitles[][] =
    {
        "#Cstrike_TitlesTXT_Game_join_terrorist_auto",
        "#Cstrike_TitlesTXT_Game_join_ct_auto"
    };

    new szName[MAX_NAME_LENGTH];
    get_user_name(iPlayer, szName, MAX_NAME_LENGTH - 1);

    util_text_msg(0, print_center, szTitles[team - 1], szName);
}


stock screen_fade(iPlayer, {_, TeamName}:team)
{
    static const rgbaTeamColors[][4] =
    {
        { 175, 0, 0, 100 },
        { 0, 0, 175, 100 }
    };

    const Float:flDuration = 1.0;
    const Float:flHoldTime = 1.0;

    util_screen_fade(iPlayer, flDuration, flHoldTime, rgbaTeamColors[team - 1]);
}


/*************** CVARS ***************/


#if AMXX_VERSION_NUM < 183

public cmd_immunity_steam()
{
    if (read_argc() > 1)
    {
        new szArg[18];
        read_argv(1, szArg, charsmax(szArg));

        g_iImmunitySteam = str_to_num(szArg);
    }
    else
    {
        server_print("^"dmb_immunity_steam^" is ^"%i^"", g_iImmunitySteam);
    }

    return PLUGIN_HANDLED;
}


public cmd_immunity_flags()
{
    if (read_argc() > 1)
    {
        new szArg[25];
        read_argv(1, szArg, charsmax(szArg));
        trim(szArg);

        g_bitsImmunity = szArg[0] == '^0'
            ? ADMIN_ALL
            : read_flags(szArg);
    }
    else
    {
        new szFlags[25];
        get_flags(g_bitsImmunity, szFlags, charsmax(szFlags));

        server_print("^"dmb_immunity_flags^" is ^"%s^"", szFlags);
    }

    return PLUGIN_HANDLED;
}

#else

public cvar_change_callback(pCvar, const szOldValue[], const szNewValue[])
{
    g_bitsImmunity = szNewValue[0] == '^0' || equali(szNewValue, "empty")
        ? ADMIN_ALL
        : read_flags(szNewValue);
}

#endif


/*************** UTILS and REUSABLE CODE ***************/


stock ModelName:get_opposite_player_model(iPlayer)
{
    switch (get_member(iPlayer, m_iModelName))
    {
        case MODEL_T_TERROR:    return MODEL_CT_URBAN;
        case MODEL_CT_URBAN:    return MODEL_T_TERROR;
        case MODEL_T_LEET:        return MODEL_CT_GSG9;
        case MODEL_CT_GSG9:        return MODEL_T_LEET;
        case MODEL_T_ARCTIC:    return MODEL_CT_SAS;
        case MODEL_CT_SAS:        return MODEL_T_ARCTIC;
        case MODEL_T_GUERILLA:    return MODEL_CT_GIGN;
        case MODEL_CT_GIGN:        return MODEL_T_GUERILLA;
        case MODEL_T_MILITIA:    return MODEL_CT_SPETSNAZ;
        case MODEL_CT_SPETSNAZ:    return MODEL_T_MILITIA;
        case MODEL_CT_VIP:        return MODEL_AUTO;
    }

    return MODEL_UNASSIGNED;
}


stock util_text_msg(iReceiver, iDest, const szMsg[], szParam1[] = "", szParam2[] = "", szParam3[] = "", szParam4[] = "")
{
    static msgTextMsg;
    msgTextMsg || (msgTextMsg = get_user_msgid("TextMsg"));

    message_begin(iReceiver ? MSG_ONE : MSG_ALL, msgTextMsg, _, iReceiver);
    {
        write_byte(iDest);
        write_string(szMsg);
        szParam1[0] && write_string(szParam1);
        szParam2[0] && write_string(szParam2);
        szParam3[0] && write_string(szParam3);
        szParam4[0] && write_string(szParam4);
    }
    message_end();
}


stock util_send_audio(iReceiver, const szSound[], iSender = 0, iPitch = PITCH_NORM)
{
    static msgSendAudio;
    msgSendAudio || (msgSendAudio = get_user_msgid("SendAudio"));

    message_begin(iReceiver ? MSG_ONE : MSG_ALL, msgSendAudio, _, iReceiver);
    {
        write_byte(iSender);
        write_string(szSound);
        write_short(iPitch);
    }
    message_end();
}


stock util_screen_fade(iReceiver, Float:flDuration, Float:flHoldTime, const rgbaColor[4], bitsFlags = 0)
{
    const iScale = 4096;

    new iDuration = util_fixed_ushort(flDuration, iScale);
    new iHoldTime = util_fixed_ushort(flHoldTime, iScale);

    static msgScreenFade;
    msgScreenFade || (msgScreenFade = get_user_msgid("ScreenFade"));

    message_begin(iReceiver ? MSG_ONE : MSG_ALL, msgScreenFade, _, iReceiver);
    {
        write_short(iDuration);
        write_short(iHoldTime);
        write_short(bitsFlags);
        write_byte(rgbaColor[0]);
        write_byte(rgbaColor[1]);
        write_byte(rgbaColor[2]);
        write_byte(rgbaColor[3]);
    }
    message_end();
}


stock util_fixed_ushort(Float:flValue, iScale)
{
    new iOutput = floatround(flValue * iScale);

    if (iOutput < 0)
        return 0;

    const iUshortMax = 0xFFFF;

    if (iOutput > iUshortMax)
        return iUshortMax;

    return iOutput;
}
Но хорошо бы внести сюда чтобы следило за привелигированых игроков. а не кого попало. Например играет 8 человек в одной команде 3 вип а в другой 1 вип игрок. с первой команды вип перекидывает во вторую. А со второй команды игрока простого перекидывает в первую.
 
Сообщения
491
Реакции
89
Помог
5 раз(а)
denbtr, ну тк сделайте, кто вам мешает? Проявите попытки в новой теме, ежели можно чтоб сделали за вас "НА ХАЛЯВУ" :derisive:
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу