Submodels ZP 4.3

Статус
В этой теме нельзя размещать новые ответы.

adamantov

Пользователь
Регистрация
12 Сен 2017
Сообщения
61
Симпатии
-54
Привет столкнулся я с тем что я не знаю как установить чтобы у игроков были разные модели а не 1 модель из субмоделей.
 

Вложения

  • 2,1 MB Просмотры: 4

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
adamantov, ну там в исходнике нужно добавить выдачу Субмодели...
 

adamantov

Пользователь
Регистрация
12 Сен 2017
Сообщения
61
Симпатии
-54
adamantov, ну там в исходнике нужно добавить выдачу Субмодели...
Я добавил же снизу исходник просто подскажи что добавить и где.[DOUBLEPOST=1550245042][/DOUBLEPOST]
adamantov, ну там в исходнике нужно добавить выдачу Субмодели...
Тут нужно добавить?
Код:
    // Custom models stuff
    static currentmodel[32], tempmodel[32], already_has_model, i, iRand, size
    already_has_model = false
    
    if (g_handle_models_on_separate_ent)
    {
        // Set the right model
        if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
        {
            iRand = random_num(0, ArraySize(model_admin_human) - 1)
            ArrayGetString(model_admin_human, iRand, g_playermodel[id], charsmax(g_playermodel[]))
            if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_admin_human, iRand))
        }
        else
        {
            iRand = random_num(0, ArraySize(model_human) - 1)
            ArrayGetString(model_human, iRand, g_playermodel[id], charsmax(g_playermodel[]))
            if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_human, iRand))
        }
        
        // Set model on player model entity
        fm_set_playermodel_ent(id)
        
        // Remove glow on player model entity
        fm_set_rendering(g_ent_playermodel[id])
    }
    else
    {
        // Get current model for comparing it with the current one
        fm_cs_get_user_model(id, currentmodel, charsmax(currentmodel))
        
        // Set the right model, after checking that we don't already have it
        if (get_pcvar_num(cvar_adminmodelshuman) && (get_user_flags(id) & g_access_flag[ACCESS_ADMIN_MODELS]))
        {
            size = ArraySize(model_admin_human)
            for (i = 0; i < size; i++)
            {
                ArrayGetString(model_admin_human, i, tempmodel, charsmax(tempmodel))
                if (equal(currentmodel, tempmodel)) already_has_model = true
            }
            
            if (!already_has_model)
            {
                iRand = random_num(0, size - 1)
                ArrayGetString(model_admin_human, iRand, g_playermodel[id], charsmax(g_playermodel[]))
                if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_admin_human, iRand))
            }
        }
        else
        {
            size = ArraySize(model_human)
            for (i = 0; i < size; i++)
            {
                ArrayGetString(model_human, i, tempmodel, charsmax(tempmodel))
                if (equal(currentmodel, tempmodel)) already_has_model = true
            }
            
            if (!already_has_model)
            {
                iRand = random_num(0, size - 1)
                ArrayGetString(model_human, iRand, g_playermodel[id], charsmax(g_playermodel[]))
                if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_human, iRand))
            }
        }
        
        // Need to change the model?
        if (!already_has_model)
        {
            // An additional delay is offset at round start
            // since SVC_BAD is more likely to be triggered there
            if (g_newround)
                set_task(5.0 * g_modelchange_delay, "fm_user_model_update", id+TASK_MODEL)
            else
                fm_user_model_update(id+TASK_MODEL)
        }
        
        // Remove glow
        fm_set_rendering(id)
    }
 

To be or not to be

Пользователь
Регистрация
9 Июн 2017
Сообщения
1.215
Симпатии
304
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу