- Article
- 2018-12-30
Открываем исходник главного мода и ищем такую строку:
// Customization vars
Перед ней добавляем:
#define MYMODELFLAG ADMIN_LEVEL_C
где ADMIN_LEVEL_C - это флаг, у которого будет заданная вами модель.
После // Customization vars добавляем:
new Array:model_myname, Array:g_modelindex_myname;
Далее ищем такую строку:
// Initialize a few dynamically sized arrays
И после нее добавляем:
model_myname = ArrayCreate(32, 1);
g_modelindex_myname = ArrayCreate(1, 1);
Двигаемся дальше и ищем:
// Custom weapon models
перед ней добавляем:
for (i = 0; i < ArraySize(model_myname); i++)
{
ArrayGetString(model_myname, i, buffer, charsmax(buffer))
format(buffer, charsmax(buffer), "models/player/%s/%s.mdl", buffer, buffer)
ArrayPushCell(g_modelindex_myname, engfunc(EngFunc_PrecacheModel, buffer))
if (g_force_consistency == 1) force_unmodified(force_model_samebounds, {0,0,0}, {0,0,0}, buffer)
if (g_force_consistency == 2) force_unmodified(force_exactfile, {0,0,0}, {0,0,0}, buffer)
}
Теперь ищем такие строки:
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))
}
на этот:
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 if (get_user_flags(id) & MYMODELFLAG)
{
iRand = random_num(0, ArraySize(model_myname) - 1)
ArrayGetString(model_myname, iRand, g_playermodel[id], charsmax(g_playermodel[]))
if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_myname, iRand))
}
Листаем чуть-чуть ниже и видим такой код:
// 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))
}
}
и заменяем его на этот:
// Set the right model, after checking that we don't already have it
if (get_user_flags(id) & MYMODELFLAG)
{
size = ArraySize(model_myname)
for (i = 0; i < size; i++)
{
ArrayGetString(model_myname, i, tempmodel, charsmax(tempmodel))
if (equal(currentmodel, tempmodel)) already_has_model = true
}
if (!already_has_model)
{
iRand = random_num(0, size - 1)
ArrayGetString(model_myname, iRand, g_playermodel[id], charsmax(g_playermodel[]))
if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_myname, iRand))
}
}
else 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))
}
}
Уже почти закончили, ищите такой код:
if (g_handle_models_on_separate_ent)
{
// Set the right model
if (g_survivor[id])
{
iRand = random_num(0, ArraySize(model_survivor) - 1)
ArrayGetString(model_survivor, iRand, g_playermodel[id], charsmax(g_playermodel[]))
if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_survivor, iRand))
}
else
{
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))
}
}
В этом блоке кода мы заменяем только этот код:
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))
}
на этот:
if (get_user_flags(id) & MYMODELFLAG)
{
iRand = random_num(0, ArraySize(model_myname) - 1)
ArrayGetString(model_myname, iRand, g_playermodel[id], charsmax(g_playermodel[]))
if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_myname, iRand))
}
else 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))
}
Листаем немного ниже и находим такой код:
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))
}
}
и заменяем его на такой:
if (get_user_flags(id) & MYMODELFLAG)
{
size = ArraySize(model_myname)
for (i = 0; i < size; i++)
{
ArrayGetString(model_myname, i, tempmodel, charsmax(tempmodel))
if (equal(currentmodel, tempmodel)) already_has_model = true
}
if (!already_has_model)
{
iRand = random_num(0, size - 1)
ArrayGetString(model_myname, iRand, g_playermodel[id], charsmax(g_playermodel[]))
if (g_set_modelindex_offset) fm_cs_set_user_model_index(id, ArrayGetCell(g_modelindex_myname, iRand))
}
}
else 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 if (equal(key, "ADMIN HUMAN"))
и перед ней добавляем:
else if (equal(key, "MYNAMEMODEL HUMAN"))
{
// Parse models
while (value[0] != 0 && strtok(value, key, charsmax(key), value, charsmax(value), ','))
{
// Trim spaces
trim(key)
trim(value)
// Add to models array
ArrayPushString(model_myname, key)
}
}
Все с исходником мы закончили работу. Теперь его можно компилировать и заменять амхх файл.
Осталось зайти в zombieplague.ini
И там где
ADMIN HUMAN =
ниже добавляем:
MYNAMEMODEL HUMAN = название модели
Сохраняем и закрываем файл. Все, теперь у игроков с флагом MYMODELFLAG будет установлена модель MYNAMEMODEL HUMAN из zombieplague.ini
Donate you can do to the author Universe, a gift in the form of a donation to his electronic piggy bank ;)
%25
Discount on all purchases
builds until September 16, 2024
Especially for you - Гость

Buy an assembly

[CS 1.6] Model Zombie - Purple Galaxy Revenant
cool skin ,i luv it

Готовый сервер «CSDM Legendary + Пушки Лазеры» для CS 1.6
у вас есть дискорд?

Готовый сервер «CSDM Legendary + Пушки Лазеры» для CS 1.6
здравейте, искам да купя тези красиви плагини, но пълна версия, но на английски език, моля, свържете се със собственика

Готовый сервер «CSDM Legendary + Пушки Лазеры» для CS 1.6
@tb_bader здравейте, искам да купя тези красиви плагини, но пълна версия, но на английски език, моля, свържете се с собственика

(Обновление) Counter-Strike Nexon: Zombies от (20 июня 2018)
Its not downloadable , Its Just a Post about Counter Strike Nexon Zombie Update
ReHLDS (Reverse-engineered) - this is a new step forward that gives a second wind to our servers. ReHLDS works 2 times faster than HLDS.
AMXModX is a Metamod add-on that allows you to create new modifications for Half-Life in the Pawn language
Reunion is a continuation of Dproto for ReHLDS. This is a metamod plugin that allows you to log into the 47/48 Non-Steam server.
Revoice is a Metamod plugin that allows voice chat between non-steam and steam clients.
The new Metamod-r contains a huge number of performance optimizations and much cleaner code. The kernel was written using a JIT compiler.
Ultimate Unprecacher is a plugin for MetaMod, it works on the principle of disabling unnecessary resources on your server, thereby you can free up space for resources for your plugins, using this module you can get rid of error 512!
ReAuthCheck - this is a Metamod plugin that checks your players for validity, with this module for REHLDS you can protect your server from bots that constantly spam ads or simply clog up a slot on the server!
NetBufExtender or NBEX - This is a metamod plugin that expands the пїЅInternet bufferпїЅ: server and client buffers (not 100% guaranteed). Expands up to 64 kb. This means that players are less likely to be kicked with the error "Reliable channel overflowed"".
UINO пїЅ metamod plugin that allows you to remove unnecessary fields from userinfo(setinfo) when the engine passes it to other players on the server. This measure reduces the amount of data transferred and slightly reduces the chance of being kicked with "Reliable channel overflowed".