Jump to content
DAYZ-CODE.RU - Создай свой игровой сервер

Search the Community

Showing results for tags 'мододел'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • THE MAIN SECTION OF THE FORUM
    • DAYZ-CODE.RU
    • АРБИТРАЖ DAYZ-CODE.RU
    • DAYZ STANDALONE GAME NEWS
  • SERVER BUILDING - DAYZ STANDALONE
    • GUIDES/MANUALS AND OTHER INSTRUCTIONS
    • HELP - DAYZ STANDALONE
  • PRIVATE SECTION OF THE SITE
    • PRIVATE SECTION
  • TRADE SECTION AND PROVISION OF SERVICES
    • PURCHASE OF GOODS AND SERVICES
    • PROVISION OF SERVICES
    • WORK
  • PRODUCT SUPPORT TOPICS
    • PRODUCT SUPPORT DAYZ STANDALONE
    • SUPPORT FOR "USEFUL SOFTWARE"
  • Different
    • FLAME ON VARIOUS TOPICS
  • JOINT PURCHASES
    • ALL JOINT PURCHASES
  • SITE ARCHIVE DAYZ-CODE.RU
    • SITE ARCHIVE
  • ARMA 3
    • ARMA 3 - GUIDES/MANUALS AND OTHER INSTRUCTIONS
    • HELP - ARMA 3
  • ARMA 3
    • ARMA 3 - Missions and Campaigns
  • ARMA 3
    • ARMA 3 - Online game
  • ARMA 3
    • ARMA 3 - Editor
  • ARMA 3 -BIS
    • ARMA 3 - BIS Bugtracker
  • DAYZ STANDALONE -BIS
    • DAYZ SA - BIS Bugtracker

Categories

  • Equipment
    • Shoes
    • Masks
    • Hats
    • Glasses
    • Gloves
    • Vests
    • Backpacks
    • Cloth
    • Belts
  • Craft
  • Food
    • Meat and Fish
    • Canned food
    • Mushrooms
    • Vegetables and fruits
    • Water and Drinks
  • Indicators
  • Construction
  • Ammo
  • Modules
    • Magazines and clips
    • Add. Modifications
    • Butts
    • Sights
    • Muzzle modifications
    • Handguard and Handles
  • Weapons
    • G. launchers
    • Auth. Rifles
    • Shotguns
    • Pistols M. guns
    • Rifles
    • Pistols
    • Throwing
  • Medicine
  • Grenades
  • Diseases
  • Instruments
  • Tents and Containers
  • Resources
    • Fuel
    • Extracted resources
    • Building Resources
    • Animal skins
  • Electrical apps
  • Means of communication
  • Sources of light
  • Repair
  • Other
  • Cooking
  • Explosives

Categories

  • DayZ STANDALONE
    • Server builds
    • Scripts, mods
    • Map modding
    • Transport
    • Weapons
    • Furniture
    • Items
    • Models
  • DayZ useful software
    • Software
    • Other

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Information


Paul


City


Member Title


VKontakte


Discord


Boosty


Mail


Skype


Steam ID

Found 2 results

  1. Привет всем! Пишу свой мод, задумка которого "аренда" домов. Для удовбства использую яблока как клас который можно будет потом заменить. И вот запутался. Столкнулся с тем, что при соблюдении всех условия (яблоко в руках), меню взаимодействия с объектом нет. Помогите разобраться. Структура мода: @HouseLockSystem ├── Config.cpp ├── meta.cpp └── Scripts └── 4_World ├── HouseCore.c ├── HouseApple.c ├── HouseWrench.c └── HouseDoors.c Config.cpp class CfgMods { class HouseLockSystem { dir = "HouseLockSystem"; name = "House Lock System"; author = "https://steamcommunity.com/profiles/76561199218849472/"; version = 2.1; dependencies[] = {"Game", "World", "Mission"}; class defs { class gameScriptModule { files[] = {"HouseLockSystem/Scripts/4_World"}; }; class worldScriptModule { files[] = {"HouseLockSystem/Scripts/4_World"}; }; class missionScriptModule { files[] = {"HouseLockSystem/Scripts/4_World"}; }; }; }; }; class CfgScripts { class HouseLockSystem_Init { postInit = 1; init = "HouseLockSystem\Scripts\4_World\HouseCore.c"; }; }; HouseCore.c class HouseCore { protected static ref HouseCore m_Instance; protected ref map<string, ref HouseData> m_Houses; protected ref map<string, ref BreachData> m_Breaches; protected string m_DataFile = "$profile/HouseData.json"; // Singleton static HouseCore Get() { if (!m_Instance) m_Instance = new HouseCore(); return m_Instance; } void HouseCore() { m_Houses = new map<string, ref HouseData>(); m_Breaches = new map<string, ref BreachData>(); LoadData(); ScheduleChecks(); } void ScheduleChecks() { GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(CheckHouseExpiry, 30000, true); GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(CheckBreachProgress, 1000, true); } void CheckHouseExpiry() { int currentTime = GetGame().GetTime(); foreach (string houseID, HouseData data: m_Houses) { if (currentTime > data.m_ExpireTime) ReleaseHouse(houseID); } } void CheckBreachProgress() { int currentTime = GetGame().GetTime(); foreach (string houseID, BreachData data: m_Breaches) { if (currentTime - data.m_StartTime > 1200) CompleteBreach(houseID); } } void ReleaseHouse(string houseID) { if (m_Houses.Contains(houseID)) { OpenAllDoors(m_Houses.Get(houseID).m_Position); m_Houses.Remove(houseID); SaveData(); } } void CompleteBreach(string houseID) { if (m_Breaches.Contains(houseID)) { OpenAllDoors(m_Houses.Get(houseID).m_Position); m_Breaches.Remove(houseID); } } string GenerateHouseID(vector pos) { return pos.ToString().Substring(0, 16); } bool ClaimHouse(PlayerBase player, vector pos) { string uid = player.GetIdentity().GetId(); string houseID = GenerateHouseID(pos); if (m_Houses.Contains(houseID)) { player.MessageAction("Дом уже занят!"); return false; } if (GetPlayerHouseCount(uid) >= 1) { player.MessageAction("Можно иметь только 1 дом!"); return false; } m_Houses.Insert(houseID, new HouseData(uid, GetGame().GetTime() + 604800, pos)); SaveData(); return true; } void StartBreach(PlayerBase player, vector pos) { string houseID = GenerateHouseID(pos); if (!m_Breaches.Contains(houseID)) { m_Breaches.Insert(houseID, new BreachData()); } } }; HouseApple.c modded class Apple { override bool CanBeTargeted() { return true; } override string GetActionText(Object target) { if (target.IsInherited(Building)) return "Закрепить дом"; return super.GetActionText(target); } override void OnAction(PlayerBase player, Object target, int action) { super.OnAction(player, target, action); if (action == UA_USE && target.IsInherited(Building)) { vector pos = target.GetPosition(); if (HouseCore.Get().ClaimHouse(player, pos)) { player.MessageAction("Дом зарезервирован на 7 дней!"); Delete(); } } } }; HouseWrench.c modded class Wrench { override bool CanBeTargeted() { return true; } override string GetActionText(Object target) { if (target.IsInherited(Building)) return "Взломать (20 мин)"; return super.GetActionText(target); } override void OnAction(PlayerBase player, Object target, int action) { super.OnAction(player, target, action); if (action == UA_USE && target.IsInherited(Building)) { HouseCore.Get().StartBreach(player, target.GetPosition()); player.MessageAction("Начался процесс взлома..."); } } }; HouseDoors.c modded class Building { override bool CanInteractWith(PlayerBase player, ActionTarget target) { HouseCore core = HouseCore.Get(); string houseID = core.GenerateHouseID(GetPosition()); // Для владельца if (core.m_Houses.Contains(houseID) && core.m_Houses.Get(houseID).m_OwnerUID == player.GetIdentity().GetId()) { return true; } // Для взломщиков if (core.m_Breaches.Contains(houseID)) { return true; } return super.CanInteractWith(player, target); } override void CloseDoor(int index) { super.CloseDoor(index); HouseCore.Get().SaveDoorState(GetPosition(), index, true); } override void OpenDoor(int index) { super.OpenDoor(index); HouseCore.Get().SaveDoorState(GetPosition(), index, false); } };
  2. Ищем кто напишет стройку с 0 или допишет пару модификаций для https://steamcommunity.com/sharedfiles/filedetails/?id=3173739565 Пишите в ЛС.
×
×
  • Create New...