Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Sinjuki

Помогите

Короче в аддоне есть файлик fn_checkKey.sqf

подскажите как эту тему фиксануть так как она работает как-то криво при запуске сервер начинает проверять на

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts




  • 0
7 минут назад, DrTauren сказал:

@Sinjuki ничего не понял. Казнить нельзя помиловать.

проблема в запуске с этим аддоном из-за того что там это скрипт сервер уходит в бесконечный экран загрузки 

Share this post


Link to post
Share on other sites
  • 0

и сам хз что это такое WBK_2281448828111998

Share this post


Link to post
Share on other sites
  • 0

@Sinjuki 

 

_unit = _this select 0;
if (isDedicated) then
{
    _addons = activatedAddons;
    if (("webknight_starwars_gundone" in _addons)) then
	{
        hintSilent "YAY!!!";
        _unit setVariable["WBK_2281448828111998_activeAddons", 1, true];
    }
	else
	{
        hintSilent "There is no server mod";
        _unit setVariable["WBK_2281448828111998_activeAddons", 2, true];
    };
}
else
{
    _unit setVariable["WBK_2281448828111998_activeAddons", 1, true];
};

Если этот аддон "webknight_starwars_gundone" отсутствует, то на игрока вешается переменная, а дальше в другом скрипте по этой переменной идет блок.

Share this post


Link to post
Share on other sites
  • 0

Если на сервере не обнаружен этот мод. то переменной присваивается значение 2 - _unit setVariable["WBK_2281448828111998_activeAddons", 2, true];
Если мод есть, то - 1.
В данном конкретном куске кода достаточно будет заменить 2 на 1 здесь и по идее усё:)
То есть - 
_unit setVariable["WBK_2281448828111998_activeAddons", 2, true];
заменить на -
_unit setVariable["WBK_2281448828111998_activeAddons", 1, true];

и пофиг будет, что есть, что нет, полюбому переменная равна 1 и та проверка должна пройти успешно, что в другом скрипте.

 

Но немного смущает, что если эта проверка не на сервере (isDedicated), а на игроке, то без всяких проверок ему ставится 1... Спрашивается - а если у игрока нету мода то что?

Edited by exploadead (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Кривой он наверное потому что проще сделать переборку полученного массива, а ещё лучше сортировку активные аддонов БИС от пользовательских, реализовать можно так, но нужно проверять 

{  

  if ("NAMEADDON" in _x) then {
        diag_log "THIS ADDON IS ACTIVE";
    };
} forEach activateAddons;

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.