Статус темы:
Закрыта.
  1. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    Hello everyone,

    I'm having a problem with file consistency checks. I'm using the AMXX plugin Files Check (Files Check (amxx port of soundcheck metamod plugin) - AlliedModders) to enforce model consistency, the plugin works fine with the pure version of ReHLDS, but it's misbehaving on the bugfixed version. It's giving an inconsistency error on all listed models, even tho they are the correct models.

    This plugin is different from ReChecker. AMXX Files Checker checks the model's size (mins, maxs) to make sure the client model is a match to the server model. ReChecker only checks for file's name and hash.

    I've also tried ReAmxModX, still have the same problem.

    Can someone please edit this plugin to work with the bugfixed ReHLDS?
    PHP:
    1.  
    2. /* AMX Mod X Plugin
    3. *
    4. * (c) Copyright 2008, ConnorMcLeod
    5. * This file is provided as is (no warranties).
    6. *
    7. */
    8.  
    9. #include <amxmodx>
    10.  
    11. new g_pcvarExactModel, g_pcvarSeparateLogFile
    12.  
    13. public plugin_init()
    14. {
    15.    static const VERSION[] = "1.0"
    16.    register_plugin("Files Check", VERSION, "ConnorMcLeod")
    17.    register_cvar("fc_version", VERSION, FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_SPONLY)
    18.    g_pcvarSeparateLogFile = register_cvar("fc_separatelog", "0")
    19. }
    20.  
    21. public plugin_precache()
    22. {
    23.    g_pcvarExactModel = register_cvar("fc_exactweapons", "0")
    24.  
    25.    static szConfigFile[64]
    26.    get_localinfo("amxx_configsdir", szConfigFile, 63)
    27.    format(szConfigFile, 63, "%s/filescheck.ini", szConfigFile)
    28.  
    29.    new File = fopen(szConfigFile, "rt")
    30.  
    31.    if(!File)
    32.        return
    33.  
    34.    static szFile[64]
    35.    while(!feof(File))
    36.    {
    37.        fgets(File, szFile, 63)
    38.        trim( szFile )
    39.        if(!szFile[0] || szFile[0] == ';' || (szFile[0] == '/' && szFile[1] == '/'))
    40.            continue
    41.        if(equali(szFile[strlen(szFile)-4], ".mdl"))
    42.        {
    43.            force_unmodified(get_pcvar_float(g_pcvarExactModel) ? force_exactfile : force_model_samebounds, {0,0,0}, {0,0,0}, szFile)
    44.        }
    45.        else
    46.        {
    47.            force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, szFile)
    48.        }
    49.    }
    50.    fclose(File)
    51. }
    52.  
    53. public inconsistent_file(id, const filename[], reason[64])
    54. {
    55.    static szMessage[192], szName[32], szAuthid[32]
    56.  
    57.    get_user_name(id, szName, 31)
    58.    get_user_authid(id, szAuthid, 31)
    59.  
    60.    formatex(szMessage, 191, "^"%s<%s>^" has inconsistent file ^"%s^"", szName, szAuthid, filename)
    61.  
    62.    switch( get_pcvar_num(g_pcvarSeparateLogFile) )
    63.    {
    64.        case 1:
    65.        {
    66.            log_amx(szMessage)
    67.        }
    68.        case 2:
    69.        {
    70.            static const szLogFile[] = "filecheck.log"
    71.            log_to_file(szLogFile, szMessage)
    72.        }
    73.        default:
    74.        {
    75.            log_message(szMessage)
    76.        }
    77.    }
    78.  
    79.    server_cmd("say ^"%s^"", szMessage)
    80. }
    81.  
     
  2. neygomon Его Темнейшество :j Команда форума

    Регистрация:
    26.02.15
    Сообщения:
    7.566
    Симпатии:
    4.146
    Пол:
    Мужской
    почему просто не добавить оригинальные модели в чекер и потом просто отсеивать все остльные? О_о
     
  3. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    I tried with ReChecker, it gives the same result.

    Server is enforcing file consistency for ../cstrike_downloads/models/player/zombie_source/zombie_source.
    Bad file ../cstrike_downloads/models/player/zombie_source/zombie_source.

    The file is the same on the server and on the FastDL, i just copy/pasted it from the server to the FastDL. I deleted the file from my cstrike and downloaded it off the server, it gives the same error.

    It's only a bug with the bugfixed ReHLDS, it happens with random models. It works perfectly on pure ReHLDS...
     
  4. neygomon Его Темнейшество :j Команда форума

    Регистрация:
    26.02.15
    Сообщения:
    7.566
    Симпатии:
    4.146
    Пол:
    Мужской
    @mr.moose, расширение у модели где?
    сейчас у Вас папка просто, а не файл
     
  5. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    I wrote the full model path, but it looks like the .mdl part got cut out.

    Could it be a problem with path string length? Maybe it's limited to 64 char strings ??
     
  6. neygomon Его Темнейшество :j Команда форума

    Регистрация:
    26.02.15
    Сообщения:
    7.566
    Симпатии:
    4.146
    Пол:
    Мужской
    @mr.moose, да, думаю, проблема в этом
     
  7. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    Is this a ReChecker limit, an AmxModX limit or ReHLDS limit?

    Can we extend it to 128 somehow?
     
  8. neygomon Его Темнейшество :j Команда форума

    Регистрация:
    26.02.15
    Сообщения:
    7.566
    Симпатии:
    4.146
    Пол:
    Мужской
  9. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    Well, so far i know that AMXX Files Checker doesnt work properly with bugfixed ReHLDS.

    Now what i want to know is this:
    1. Is there something in ReChecker's code that checks file's path length in the resources.ini file? If yes, i should bug ReChecker devs, maybe there is a simple solution here.
    2. Is there something in AmxModX's force_unmodified native that doesnt work on bugfixed ReHLDS, or some kind of check for file's path length here? If yes, maybe ReAmxModX devs can help.
    3. Or maybe this is an issue for ReHLDS devs?

    I dont know where the problem is and who to ask...
     
  10. PRoSToC0der Разработчик

    Регистрация:
    22.02.16
    Сообщения:
    307
    Симпатии:
    143
    Пол:
    Мужской
    Resource name is limited to 63 ASCII chars. That is limited by network protocol. So idk how it was work on hlds and on pure ver.
    Why u use this shit "../cstrike_downloads/", just use "models/player/zombie_source/zombie_source.mdl". E.g. you write: precache_model("models/player/zombie_source/zombie_source.mdl"), but not: precache_model("../cstrike_downloads/models/player/zombie_source/zombie_source.mdl").
    Never use this shits:
    "../cstrike/"
    "../cstrike_downloads/"
    "../valve/"
    "../cstrike_addon/"
    "../cstrike_hd/"
    etc.
     
  11. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    @PRoSToC0der, i use the full path here because of ReChecker, it requires the full path file to be able to detect it. For precaching files, there is no need to enter the full path. I tested your suggestion in the ReChecker's resource file, it didnt work, the files are not detected.

    Also, there is a difference in cstrike and cstrike_downloads. Nonsteam players download files in the cstrike folder, Steam players download files in the cstrike_downloads folder, so i have to include both.

    I can probably get ReChecker to enforce consistency if i can rename some of the models to use shorter names. But my main question was, Why AMXX Files Check doesn't work on bugfixed ReHLDS, and how can we edit it to get it to work?
     
  12. PRoSToC0der Разработчик

    Регистрация:
    22.02.16
    Сообщения:
    307
    Симпатии:
    143
    Пол:
    Мужской
    No, it doesn't require fullpath.
    Can you show how you try to detect it? (with lines above and below it)

    Please give me an example of a big model for testing.
     
  13. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    Here are a few lines of the resources file for ReChecker:

    PHP:
    1. ;****************************************************************** Zombie Models ********************************************************************
    2. ; nonsteam
    3. "../cstrike/models/player/zombie_source/zombie_source.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    4. "../cstrike/models/player/zod_fat/zod_fat.mdl"                           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    5. "../cstrike/models/player/z_assassin/z_assassin.mdl"                   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    6. "../cstrike/models/player/z_fast/z_fast.mdl"                           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    7. "../cstrike/models/player/z_rubber/z_rubber.mdl"                       UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    8. "../cstrike/models/player/zodvampire/zodvampire.mdl"                   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    9. "../cstrike/models/player/z_climber/z_climber.mdl"                       UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    10. "../cstrike/models/player/z_burned/z_burned.mdl"                       UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    11. "../cstrike/models/player/zownemesis/zownemesis.mdl"                   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    12. "../cstrike/models/player/dione/dione.mdl"                               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    13. "../cstrike/models/player/sk_winos/sk_winos.mdl"                       UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    14. "../cstrike/models/player/zod_hunter/zod_hunter.mdl"                   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    15. "../cstrike/models/player/zod_admin_zombie/zod_admin_zombie.mdl"       UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    16. "../cstrike/models/player/zod_admin_human/zod_admin_human.mdl"           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    17. ; steam
    18. ;"../cstrike_downloads/models/player/zombie_source/zombie_source.mdl"   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    19. "../cstrike_downloads/models/player/zod_fat/zod_fat.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    20. "../cstrike_downloads/models/player/z_assassin/z_assassin.mdl"           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    21. "../cstrike_downloads/models/player/z_fast/z_fast.mdl"                   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    22. "../cstrike_downloads/models/player/z_rubber/z_rubber.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    23. "../cstrike_downloads/models/player/zodvampire/zodvampire.mdl"           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    24. "../cstrike_downloads/models/player/z_climber/z_climber.mdl"           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    25. "../cstrike_downloads/models/player/z_burned/z_burned.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    26. "../cstrike_downloads/models/player/zownemesis/zownemesis.mdl"           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    27. "../cstrike_downloads/models/player/dione/dione.mdl"                   UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    28. "../cstrike_downloads/models/player/sk_winos/sk_winos.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    29. "../cstrike_downloads/models/player/zod_hunter/zod_hunter.mdl"           UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    30. ;"../cstrike_downloads/models/player/zod_admin_zombie/zod_admin_zombie.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    31. ;"../cstrike_downloads/models/player/zod_admin_human/zod_admin_human.mdl"               UNKNOWN           "echo ' [name] <[steamid]> <IP:[ip]> -> file: ([file_name]), md5hex: ([file_md5hash]) for ([name])'"
    32.  
    As you can see i commented out 3 lines in the steam models because the path is too big. I tested with the path from "../models/player..." but it didnt work. ReChecker requires the full path to find the file.
     
    Последнее редактирование: 08.09.16
  14. PRoSToC0der Разработчик

    Регистрация:
    22.02.16
    Сообщения:
    307
    Симпатии:
    143
    Пол:
    Мужской
    You should use "models/player/...", not "../models/player/...".
     
  15. mr.moose Пользователь

    Регистрация:
    12.06.16
    Сообщения:
    16
    Симпатии:
    3
    You're right, it works. I dont need separate checks for steam and nonsteam now. Thank you.
     
    PRoSToC0der нравится это.
  16. neygomon Его Темнейшество :j Команда форума

    Регистрация:
    26.02.15
    Сообщения:
    7.566
    Симпатии:
    4.146
    Пол:
    Мужской
  17. PRoSToC0der Разработчик

    Регистрация:
    22.02.16
    Сообщения:
    307
    Симпатии:
    143
    Пол:
    Мужской
    Не закрывай, мы ещё не разобрались с основной проблемой.
     
  18. neygomon Его Темнейшество :j Команда форума

    Регистрация:
    26.02.15
    Сообщения:
    7.566
    Симпатии:
    4.146
    Пол:
    Мужской
  19. PRoSToC0der Разработчик

    Регистрация:
    22.02.16
    Сообщения:
    307
    Симпатии:
    143
    Пол:
    Мужской
    @mr.moose what OS have you used for tests? Can you test this plugin on windows? Did you use ReChecker when you test this plugin?
     
  20. PRoSToC0der Разработчик

    Регистрация:
    22.02.16
    Сообщения:
    307
    Симпатии:
    143
    Пол:
    Мужской
    @mr.moose it works good on my server (on Windows, w/o ReChecker, with fc_exactweapons 0). Can you give me your server address in PM? I want to see this bug.
     
    Последнее редактирование: 08.09.16
Статус темы:
Закрыта.