Плохо работает get_players

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
92
Реакции
23
Всем привет. На deathrun сервере неправильно считается количество террористов. В чём может быть проблема?
Код:
public Command_Duel(id)

{

    if(g_bDuelStarted || !is_user_alive(id) || get_member(id, m_iTeam) != TEAM_CT) return PLUGIN_HANDLED;

 

    new players[32], pnumct, pnumtt;

 

    get_players(players, pnumct, "ahe", "CT");

    log_amx("1 pnumct = %d", pnumct);

    if(pnumct != 1) return PLUGIN_HANDLED;

    log_amx("2 pnumct = %d", pnumct);

 

    get_players(players, pnumtt, "ahe", "TERRORIST");

    log_amx("1 pnumtt = %d", pnumtt);

    if(pnumtt != 1) return PLUGIN_HANDLED;

    log_amx("2 pnumtt = %d", pnumtt);

    g_iDuelPlayers[DUELIST_CT] = id;

 

    menu_display(id, g_iDuelMenu);

 

    return PLUGIN_HANDLED;

}
L 01/11/2018 - 19:36:04: [deathrun_mode_duel.amxx] 1 pnumct = 1
L 01/11/2018 - 19:36:04: [deathrun_mode_duel.amxx] 2 pnumct = 1
L 01/11/2018 - 19:36:04: [deathrun_mode_duel.amxx] 1 pnumtt = 0
 
Последнее редактирование модератором:
Сообщения
2,491
Реакции
2,794
Помог
61 раз(а)
В живих хоть ТТ есть?
 
Сообщения
584
Реакции
1,006
Помог
18 раз(а)
Спросите у того, кто вам флаги сменил с "ae" на "ahe"
Код:
public Command_Duel(id)
{
    if(g_bDuelStarted || !is_user_alive(id) || cs_get_user_team(id) != CS_TEAM_CT) return PLUGIN_HANDLED;
        
    new players[32], pnum; get_players(players, pnum, "ae", "CT");
    if(pnum > 1) return PLUGIN_HANDLED;
    
    g_iDuelPlayers[DUELIST_CT] = id;
    
    get_players(players, pnum, "ae", "TERRORIST");
    if(pnum < 1) return PLUGIN_HANDLED;
    
    menu_display(id, g_iDuelMenu);
    
    return PLUGIN_HANDLED;
}
 
Сообщения
92
Реакции
23
Mistrick, убрал флаги h:
Код:
public Command_Duel(id)
{
    if(g_bDuelStarted || !is_user_alive(id) || get_member(id, m_iTeam) != TEAM_CT) return PLUGIN_HANDLED;
    
    new players[32], pnumct, pnumtt;
    
    get_players(players, pnumct, "ae", "CT");
    log_amx("1 pnumct = %d", pnumct);
    if(pnumct != 1) return PLUGIN_HANDLED;
    log_amx("2 pnumct = %d", pnumct);
    
    get_players(players, pnumtt, "ae", "TERRORIST");
    log_amx("1 pnumtt = %d", pnumtt);
    if(pnumtt != 1) return PLUGIN_HANDLED;
    log_amx("2 pnumtt = %d", pnumtt);
    g_iDuelPlayers[DUELIST_CT] = id;
    
    menu_display(id, g_iDuelMenu);
    
    return PLUGIN_HANDLED;
}
L 01/11/2018 - 22:30:11: [deathrun_mode_duel.amxx] 1 pnumct = 1
L 01/11/2018 - 22:30:11: [deathrun_mode_duel.amxx] 2 pnumct = 1
L 01/11/2018 - 22:30:11: [deathrun_mode_duel.amxx] 1 pnumtt = 0
20180111223014_1.jpg
 
Сообщения
584
Реакции
1,006
Помог
18 раз(а)
igor_grusha, version, game version, meta list и прочее приложите
 
Сообщения
92
Реакции
23
Mistrick,
Код:
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.0.0.567-dev
Build date: 11:08:28 May 21 2017 (1135)
Build from: https://github.com/dreamstalker/rehlds/commit/8276436
Код:
ReGameDLL version: 5.2.0.195-dev
Build date: 18:19:06 May  6 2017
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/e71deb8
Код:
Currently loaded plugins:
description      stat pend  file              vers      src   load  unlod
[ 1] SafeNameAndChat  RUN   -    SafeNameAndChat.  v1.1      ini   ANY
[ 2] Ultimate Unprec  RUN   -    ultimate_unpreca  v0.3 Alp  ini   ANY
[ 3] AMX Mod X        RUN   -    amxmodx_mm_i386.  v1.8.2-d  ini   Start ANY
[ 4] Reunion          RUN   -    reunion_mm_i386.  v0.1.75   ini   Start Never
[ 5] ReSemiclip       RUN   -    resemiclip_mm_i3  v2.3.9    ini   ANY
[ 6] ReAuthCheck      RUN   -    reauthcheck_mm_i  v0.1.6    ini   Start Never
[ 7] Rechecker        RUN   -    rechecker_mm_i38  v2.3      ini   ANY
[ 8] Fun              RUN   -    fun_amxx_i386.so  v1.8.2    pl3   ANY
[ 9] CStrike          RUN   -    cstrike_amxx_i38  v1.8.2-d  pl3   ANY
[10] CSX              RUN   -    csx_amxx_i386.so  v1.8.2    pl3   ANY
[11] Hide Cvars       RUN   -    hidecvars_amxx_i  v1.0      pl3   ANY
[12] MySQL            RUN   -    mysql_amxx_i386.  v1.8.2    pl3   ANY
[13] FakeMeta         RUN   -    fakemeta_amxx_i3  v1.8.2    pl3   ANY
[14] Engine           RUN   -    engine_amxx_i386  v1.8.2    pl3   ANY
[15] Ham Sandwich     RUN   -    hamsandwich_amxx  v1.8.2    pl3   ANY
[16] ReAPI            RUN   -    reapi_amxx_i386.  v5.1.0.1  pl3   ANY   Never
16 plugins, 16 running
Код:
Currently loaded plugins:
name                    version     author            file             status
[  1] admin_loader            0.3.7       kanagava          admin_loader.am  running
[  2] WebHS                   0.1         kanagava          fb_web_online.a  running
[  3] FreshBans               1.3.7b      kanagava          fresh_bans.amxx  running
[  4] Screen Ban              0.1         kanagava          ScreenBanV2.amx  running
[  5] Advanced Subnet Bans    1.1         Slavvkko          advanced_subnet  running
[  6] Native get_user_fps     1.2         .csF Group        FpsGetV1.amxx    running
[  7] FPS Control             1.2         .csF Group        FpsControlV2.am  running
[  8] [CS] Player Models API  1.2         WiLS              cs_player_model  running
[  9] Obscura Cam             0.7         Nani (SkumTomteN  ObscuraCam_0.7.  running
[ 10] DeathRun Shop           Smowin Edi  tuty & smowin     animation.amxx   running
[ 11] Block Advert            1.4         neygomon          BlockSpamV1.amx  running
[ 12] Admin Commands          1.8.2       AMXX Dev Team     admincmd.amxx    running
[ 13] Multi-Lingual System    1.8.2       AMXX Dev Team     multilingual.am  running
[ 14] Menus Front-End         1.8.2       AMXX Dev Team     menufront.amxx   running
[ 15] Commands Menu           1.8.2       AMXX Dev Team     cmdmenu.amxx     running
[ 16] Players Menu            1.8.2       AMXX Dev Team     plmenu.amxx      running
[ 17] Teleport Menu           1.8.2       AMXX Dev Team     telemenu.amxx    running
[ 18] Maps Menu               1.8.2       AMXX Dev Team     mapsmenu.amxx    running
[ 19] Plugin Menu             1.8.2       AMXX Dev Team     pluginmenu.amxx  running
[ 20] Admin Chat              1.8.0.3660  AMXX Dev Team     adminchat.amxx   running
[ 21] Anti Flood              1.8.2       AMXX Dev Team     antiflood.amxx   running
[ 22] Admin Votes             1.8.2       AMXX Dev Team     adminvote.amxx   running
[ 23] Map Manager             2.5.61      Mistrick          MapManagerV1.am  debug
[ 24] Map Manager: Sub Plugi  0.1         Mistrick          mapmanager_subp  running
[ 25] Pause Plugins           1.8.2       AMXX Dev Team     pausecfg.amxx    running
[ 26] Stats Configuration     1.8.2       AMXX Dev Team     statscfg.amxx    running
[ 27] Aliases checker         0.8.2       kanagava          alias_detector.  running
[ 28] Anti Alive Spectator    0.1         Grusha            AntiSpecAliveV1  running
[ 29] Autoresponder/Advertis  0.5         MaximusBrood      ad_manager.amxx  running
[ 30] Frost Trap              1.11        R3X               FrostTrapDeathr  running
[ 31] Cs_Hook                 1.0         Sulky             hookV2.amxx      running
[ 32] Money Transfer          1.0         Unknown           MoneyV1.amxx     running
[ 33] AMXX Gag                1.3         xPaw & Exolent    GagMenuV1.amxx   running
[ 34] Entity Remover          0.4         Exolent           entity_remover.  running

[ 36] Knife                   1.1         Psycrow           wolverine_claws  running
[ 37] Weapon Model + Sound R  1.3         GHW_Chronic       GHW_Weapon_Repl  running
[ 38] Auto Silen Weapon       100500      quckly            auto_silen_weap  running
[ 39] Auto-rr                 0.1         Grusha            hello.amxx       running
[ 40] Realtime Hud/DHUD Mess  1.0         Radius            realtime_hudmsg  running
[ 41] PlayerModels            0.1b        BlackSmoke        ChangeModelsPla  running
[ 42] Vip-Menu                0.3         Grusha            VipMenuV2.amxx   debug
[ 43] AdminMenu-AMXMODMENU    0.4         Grusha            AdminMenuV2.amx  running
[ 44] GruMenu                 0.1         Grusha            GruMenuV1.amxx   running
[ 45] plugin_trail            1.3.1       Bahrmanou         TrailV1.amxx     running
[ 46] GHW Pet Followers       2.2         GHW_Chronic       GHW_Pet_Followe  running
[ 47] SpecInfo                1.3.1       Ian Cammarata     specinfo.amxx    running
[ 48] Plus in nick fix        0.2         Flash             nickfix.amxx     running

[ 50] Afk Control             0.4         Freedo.m | neygo  AfkControlV1.am  running
[ 51] End Round Music         2.0         Sho0ter           MusicV1.amxx     running
[ 52] Bags of money           0.1         Grusha :D         BagsMoneyV2.amx  running
[ 53] AMXX Unstuck            1.7.2       AMXX Dev Builder  UnStuckV1.amxx   running
[ 54] RemoveDrop              0.1         Grusha            RemoveDropV1.am  running
[ 55] DhudInfa                0.2         Grusha            DhudInfaV2.amxx  running
[ 56] Chat Manager            1.1.1-11    Mistrick          chatmanager.amx  debug
[ 57] ScoreBoard Title        1.0         xPaw              ScoreBoardTitle  running
[ 58] WalkGuard               1.3.2       mogel             WalkguardFree.a  running
[ 59] Map Spawns Editor       1.0.16      iG_os             map_spawns_edit  running
[ 60] Block Spawn For Reconn  0.1         Bos93             BlockSpawn.amxx  running

[ 62] Admin_Check             0.1         CepeH9            AdminCheckV1.am  running
[ 63] BanIP Fakes             0.2         Safety1st         BanIPFakesV1.am  running
[ 64] Block Spawn For Reconn  0.1         Bos93             AntiReconnectV1  running
[ 65] Reset Score             0.1         Grusha :D         ResetScoreV1.am  running

[ 67] Change Game Name        1.2         ReHLDS Team       ChangeGameName.  running

[ 69] Send Audio Native Syst  1.0         Grusha :D         SendAudioV1.amx  running
[ 70] Player-Menu             0.2         Grusha            PlayerMenuV3.am  debug
[ 71] Deathrun: Core          1.1.4       Mistrick          deathrun_core.a  running
[ 72] Deathrun: Buttons Cont  1.0.1       Mistrick          deathrun_button  running
[ 73] Deathrun: Lifes         1.0         Mistrick          deathrun_lifes.  debug
[ 74] Deathrun: Informer      1.0         Mistrick          deathrun_inform  running
[ 75] Deathrun: Teleport Spo  1.0.2       Mistrick          deathrun_telepo  paused
[ 76] Deathrun: Modes         1.0.5       Mistrick          deathrun_modes.  running
[ 77] Deathrun Mode: Buttons  1.0.0       Mistrick          deathrun_mode_b  running
[ 78] Deathrun Mode: Snow     1.0.4       Mistrick          deathrun_mode_s  running
[ 79] Deathrun Mode: Free     1.0.1       Mistrick          deathrun_mode_f  running
[ 80] Deathrun Mode: Duel     1.0.3       Mistrick          deathrun_mode_d  running
[ 81] DeathRun Bets           1.0         Sho0ter & CaNiBa  deathrun_bets.a  debug
[ 82] Deathrun: Shop          0.1.2       Mistrick          deathrun_shop.a  running
[ 83] Deathrun Shop: Items    0.1         Mistrick          deathrun_shop_i  debug
[ 84] Easy MultiJump          1.6         twistedeuphoria/  MultiJumpV1.amx  debug
84 plugins, 83 running
 
Сообщения
584
Реакции
1,006
Помог
18 раз(а)
igor_grusha, снесите и начисто поставьте релизный амхх 182 + cstrike с фиксом под regamedll.
Что за сборку вы тянете, откуда такие плагины?
[ 20] Admin Chat 1.8.0.3660 AMXX Dev Team adminchat.amxx running
 
Сообщения
92
Реакции
23
Mistrick, всё равно иногда ломается опять, помогает рестарт сервера
 
Сообщения
1,293
Реакции
2,293
Помог
57 раз(а)
Извиняюсь, если уже не актуально.

Эта проблема возникает из-за использования в get_players() флага "e". И да, действительно, помогает только рестарт сервера (даже смена карты на это не влияет). Возможно это фиксилось в какой-то версии amxx, но я не проверял, и предпочитая не рисковать, использую полную выборку ("a") + отдельный перебор по команде.
 
Статус
В этой теме нельзя размещать новые ответы.

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

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