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
PLAYERDEAD

Невидимка для админа от ботов

Recommended Posts

Данный скрипт позволяет оставаться невидимым для ботов. 
Боты не будут реагировать на вас, как будто вас нет)

Открываем нашу админку от InfiSTAR'a 
Нам понадобится файл AT.sqf 

 


Находим условия 

if(isNil "adminshowmiscmenu")then
{
 

 

 В этом условии находим 

adminadd = adminadd + [" Stealth / Invisible",admininvis,"1","0","0","0",[]];
 

 

 И добавляем ниже 

adminadd = adminadd + [" AI Invisible",invisibleBoth,"1","0","0","0",[]];
 

 

После чего ищем 

 admininvis =
    {
        if(isNil 'inv1')then{inv1 = 0;};
        if(inv1 == 0)then
        {
            PVAH_AdminReq = [3,player];
            publicVariableServer "PVAH_AdminReq";
            
            inv1 = 1;
            hint "Invisibility Activated";
            
            _sl = format["%1 Invisibility Activated",name player];
            PVAH_WriteLogReq = [player,toArray _sl];
            publicVariableServer 'PVAH_WriteLogReq';
        }
        else
        {
            PVAH_AdminReq = [3,player];
            publicVariableServer "PVAH_AdminReq";
            
            inv1 = 0;
            hint "Invisibility Disabled";
            
            _sl = format["%1 Invisibility Disabled",name player];
            PVAH_WriteLogReq = [player,toArray _sl];
            publicVariableServer 'PVAH_WriteLogReq';
        };
    };
 

 

После этого добавляем 

invisibleBoth = {
            Private ["_sl"];
            if !(captive player) then
                {
                    player setCaptive 1;
                    _sl    =    format["%1 invisible both ON", (name player)];
                }else{
                    player setCaptive 0;
                    _sl    =    format["%1 invisible both OFF", (name player)];
                PVAH_WriteLogReq = [player, _sl];
                publicVariableServer "PVAH_WriteLogReq";
        };
    };
 

 

Сохраняем. 
Теперь вас не будут видеть боты  :smile:

Share this post


Link to post
Share on other sites



invisibleBoth = {
            if !(captive player) then
            {
                player setCaptive 1;
                _sl = format["%1 invisible both ON", name player];
                PVAH_WriteLogReq = [player,toArray _sl];
                publicVariableServer "PVAH_WriteLogReq";
            }else{
                player setCaptive 0;
                _sl = format["%1 invisible both OFF", name player];
                PVAH_WriteLogReq = [player,toArray _sl];
                publicVariableServer "PVAH_WriteLogReq";
            };
       };

Более правильный вариант кода.

Share this post


Link to post
Share on other sites

 

invisibleBoth = {
            if !(captive player) then
            {
                player setCaptive 1;
                _sl = format["%1 invisible both ON", name player];
                PVAH_WriteLogReq = [player,toArray _sl];
                publicVariableServer "PVAH_WriteLogReq";
            }else{
                player setCaptive 0;
                _sl = format["%1 invisible both OFF", name player];
                PVAH_WriteLogReq = [player,toArray _sl];
                publicVariableServer "PVAH_WriteLogReq";
            };
       };

Более правильный вариант кода.

Работает, проверено. Спасибо.

Share this post


Link to post
Share on other sites

После смена скина скрипт не работает

Share this post


Link to post
Share on other sites

После смена скина скрипт не работает

ну так перезапусти скрипт и все

Share this post


Link to post
Share on other sites

Зачем вообще играя с данной плюхай менять скин  :blink: 
Я никогда этого не понимал и наверное не пойму  :laugh:

Share this post


Link to post
Share on other sites

для тех кому интересно как же это работает,а именно что за команда такая setCaptive

тык
 

Mark a unit as captive. If unit is a vehicle, commander is marked. A captive is neutral to everyone (belong to civilian side), and will not trigger "detected by" conditions for its original side. 
 

 

Проще говоря отмечает игрока как пленника,а он считается нейтральным для всех.

Share this post


Link to post
Share on other sites

У меня как-то странно боты себя ведут, по началу палят по мне, потом перестают)))

Share this post


Link to post
Share on other sites

Данный скрипт позволяет оставаться невидимым для ботов. 

Боты не будут реагировать на вас, как будто вас нет)

 

Открываем нашу админку от InfiSTAR'a 

Нам понадобится файл AT.sqf 

 

 

Находим условия 

if(isNil "adminshowmiscmenu")then
{
 

 

 В этом условии находим 

adminadd = adminadd + [" Stealth / Invisible",admininvis,"1","0","0","0",[]];
 

 

 И добавляем ниже 

adminadd = adminadd + [" AI Invisible",invisibleBoth,"1","0","0","0",[]];
 

 

После чего ищем 

 admininvis =
    {
        if(isNil 'inv1')then{inv1 = 0;};
        if(inv1 == 0)then
        {
            PVAH_AdminReq = [3,player];
            publicVariableServer "PVAH_AdminReq";
            
            inv1 = 1;
            hint "Invisibility Activated";
            
            _sl = format["%1 Invisibility Activated",name player];
            PVAH_WriteLogReq = [player,toArray _sl];
            publicVariableServer 'PVAH_WriteLogReq';
        }
        else
        {
            PVAH_AdminReq = [3,player];
            publicVariableServer "PVAH_AdminReq";
            
            inv1 = 0;
            hint "Invisibility Disabled";
            
            _sl = format["%1 Invisibility Disabled",name player];
            PVAH_WriteLogReq = [player,toArray _sl];
            publicVariableServer 'PVAH_WriteLogReq';
        };
    };
 

 

После этого добавляем 

invisibleBoth = {
            Private ["_sl"];
            if !(captive player) then
                {
                    player setCaptive 1;
                    _sl    =    format["%1 invisible both ON", (name player)];
                }else{
                    player setCaptive 0;
                    _sl    =    format["%1 invisible both OFF", (name player)];
                PVAH_WriteLogReq = [player, _sl];
                publicVariableServer "PVAH_WriteLogReq";
        };
    };
 

 

Сохраняем. 

Теперь вас не будут видеть боты  :smile:

 

Топчик!  :wink:

Share this post


Link to post
Share on other sites

Если вы все сделали правильно, то она работает и для них. Hidden Admin по функционалу от супер админа отличается только тем, что его нет в списке админов. 

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

  • Similar Content

    • By BR0wi
      Подскажите где найти людей, которые делаю моды на заказ. К кому вообще обращаться? Или что бы реализовать свои идеи нужно самому "год" сидеть и изучать все механики модинга?
    • By CubeIn
      Приветствую господа, хочу создать новый проект, уникальный, но для этого нужен маппер.
      Я оставлю здесь свой дискрод, напишите в лс, кто готов взяться за крупный проект.
      4me#4542
    • By 6agu
      Поставил
      Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
    • By 123new
      Много вопросов на данную тему наблюдаю от новичков, попробую прояснить немного сей вопрос.
       
      Предположим. что вы уже знаете на каких координатах вам надо спавнить определенное здание или объект\животное\бота, с каким углом поворота. И так. эта тема для вас.
       
      Сразу делаю пометку, метод, который добавили нам разработчики игры в патче 1.15, очень хорошо описал наш товарищ в сообщении форума:
      Рекоммендую вам использовать именно его!
      Ниже опубликованы старые методы.
       
      Если вы с расставили их с модифицированной версии Offline (Offline by Arksenor это называется), то вы получили и нашли код вида:
      GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13251.875000 0.0 3748.525879").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13254.599609 0.0 3722.703613").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13257.344727 0.0 3696.718750").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13260.040039 0.0 3670.984131").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13262.756836 0.0 3645.180176").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13265.441406 0.0 3619.531982").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13268.124023 0.0 3593.995361").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13270.844727 0.0 3568.186523").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13273.514648 0.0 3542.561279").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13276.195313 0.0 3517.048828").SetOrientation("-96.000000 0.000000 0.000000"); GetGame().CreateObject("Land_CementWorks_ExpeditionB", "13278.399414 0.0 3496.097900").SetOrientation("-96.000000 0.000000 0.000000"); Здесь (по примеру первой строки) 1 значение в скобках - id постройки/объекта, 2 значение - координаты в формате X Y Z, разделенные пробелом, 3 - значение поворота примерно в том же формате.
      Как это делать в Offline - статья от автора Offine:
      https://github.com/Arkensor/DayZCommunityOfflineMode/wiki/Add-custom-objects-to-your-server-or-mission
       
      И так, инструкция:
      1. Добавляем в начало init.c файла в вашей mpmissions следующий код:
      #include "$CurrentDir:mpmissions\dayzOffline.chernarusplus\spawn_buildings.c" 2. Создаем в папке вашей активной mpmissions файлик spawn_buildings.c и заполняем его следующей информацией.
      void SpawnObject( string type, vector position, vector orientation ) { private string NameBlockLog = "[CreateObject] "; private string InfoLog = ""; if(type != "") { auto obj = GetGame().CreateObject( type, "0 0 0" ); if(obj) { if ((position[0] != 0) && (position[1] != 0) && (position[2] != 0)) { obj.SetPosition( position ); obj.SetOrientation( orientation ); obj.Update(); if (obj.CanAffectPathgraph()) { obj.SetAffectPathgraph(true, false); GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj); } InfoLog = "[Type: '" + obj.GetType() + "' Position: '" + obj.GetPosition().ToString() + "' Orientation: '" + obj.GetOrientation().ToString() + "']"; Write_Log(NameBlockLog + " Object has been created successfully! Info " + InfoLog); } else { InfoLog = "[Type: '" + type + "' Position: '" + position + "' Orientation: '" + orientation + "']"; Write_Log(NameBlockLog + " Object can't be created! Incorrect writed position. Info " + InfoLog); } } else { InfoLog = "[Type: '" + type + "' Position: '" + position + "' Orientation: '" + orientation + "']"; Write_Log(NameBlockLog + " Object can't be created! Info " + InfoLog); } } else { InfoLog = "[Type: '" + type + "' Position: '" + position + "' Orientation: '" + orientation + "']"; Write_Log(NameBlockLog + " Object can't be created! Incorrect writed type. Info " + InfoLog); } } void Write_Log(string message) { Print(String(message)); } 3. Открываем созданный нами файл,  и в конце файла дописываем следующее:
      void SpawnAirfeeldBuildings() { SpawnObject( "Land_CementWorks_ExpeditionB", "13251.875000 0.0 3748.525879", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13254.599609 0.0 3722.703613", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13257.344727 0.0 3696.718750", "-96.000000 0.000000 0.000000"); } void SpawnKrasnoBuildings() { SpawnObject( "Land_CementWorks_ExpeditionB", "13251.875000 0.0 3748.525879", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13254.599609 0.0 3722.703613", "-96.000000 0.000000 0.000000"); SpawnObject( "Land_CementWorks_ExpeditionB", "13257.344727 0.0 3696.718750", "-96.000000 0.000000 0.000000"); } Где после void - название функции идет, а между открытыми скобками вызов спавна самих зданий на указанных координатах.
      На примере 1 строки:
      Land_CementWorks_ExpeditionB - id постройки (type)
      13251.875000 0.0 3748.525879 - координаты в формате X Y Z
      -96.000000 0.000000 0.000000 - значение поворота в формате X Y Z
      Внимание: id постройки и координаты в примере указаны не верные и требуют подключения дополнительной модификации для корректной работы!!! Координаты не соответствуют названию функции!!!
      4. открываем в MpMissions в папке с вашей активной миссией init.c и перед ЗАКРЫВАЮЩЕЙ скобкой '}' дописываем нужную нам функцию (это будет активация спавна на карте):
      SpawnAirfeeldBuildings(); 5. Готово, Запускайте сервер, и в scripts.log вы увидите процедуру спавна ваших зданий и увидите, спавнятся ли они на карте или нет.
      Можно написать конечно и более готовую, универсальную систему спавна на карте со считыванием конфигурации из файла, но я считаю это лишним.
       
      Как заполнить добавленные здания лутом на карте:
      вариант 1:
      https://github.com/Arkensor/DayZCommunityOfflineMode/wiki/Enable-loot-for-custom-placed-objects
      вариант 2: вручную заполнить xml-файл  mapgrouppos.xml в mpmssions данными о местоположении зданий, где rpy - значение поворота здания в формате Z Y X
       
      С помощью данной статьи вы можете разместить любой элемент игры(постройку, животное, зомби, бота), доступный к спавну через любую модификацию-админ. панель. Очень полезный мод в этом смысле BuilderItems, с его помощью можно творить поистину интересные локации!
    • By Venom21
      Появилась такая проблема, нужно закрыть некоторые слоты под одежду, когда на определённый слот одет предмет…
      пример: возьмём экзоскелет от Фидова, там есть две версии которая одеваеться как на тело и ноги, и есть которая одеваться на разгрузку и пояс, так вот, нужно например чтобы при одетом экзаче на тело и ноги слоты под пояс и разгрузку блокировались, либо только под определенные предметы, если есть интерес то цену можем в личке обсудить…
      P.S. Разрешение от Фидова на переделку и переупаковку есть)
  • Our picks

×
×
  • 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.