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 serversDon'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
-
Our picks
Установлен мод Base Furniture 3
Есть в этом моде полки для одежды (Shelf).
Если туда положить вещи (например рюкзак или куртку) и в эту вещь положить лут, то после рестарта сервера весь лут который был в рюкзаке, куртке и т.д. выпадает на землю. Пример на скрине.
Ещё заметил, что нельзя положить вещи в рюкзак пока он прикреплен к этой полке, но взять вещи можно. Так же вещи которые выпадают, почему-то не пропадают после истечения lifetime в types.xml
class Skyline_Shelf: Skyline_Furniture_Base { scope=2; displayName="Shelf"; descriptionShort="Made by Axobi"; model="Skyline_Furniture_Base\Shelf\Shelf.p3d"; bounding="BSphere"; overrideDrawArea="3.0"; forceFarBubble="true"; handheld="true"; carveNavmesh=1; canBeDigged=0; weight=50000; itemSize[]={10,10}; physLayer="item_large"; rotationFlags=0; class Cargo { itemsCargoSize[]={6,6}; openable=0; allowOwnedCargoManipulation=1; }; attachments[]= { "Shoulder1", "Shoulder2", "Pistol", "Back", "Body", "Legs", "Feet", "Eyewear", "Mask", "Gloves", "Vest", "Headgear" }; class GUIInventoryAttachmentsProps { class Row1 { name="Row 1"; description=""; attachmentSlots[]= { "Shoulder1", "Shoulder2" }; icon="missing"; }; class Row2 { name="Row 2"; description=""; attachmentSlots[]= { "Mask", "Vest", "Pistol" }; icon="missing"; }; class Row3 { name="Row 3"; description=""; attachmentSlots[]= { "Eyewear", "Gloves", "Headgear", "Body" }; icon="missing"; }; class Row4 { name="Row 4"; description=""; attachmentSlots[]= { "Back", "Legs", "Feet" }; icon="missing"; }; }; };
Класс Skyline_Furniture_Base
class Skyline_Furniture_Base: Container_Base { scope=2; destroyOnEmpty=0; varQuantityDestroyOnMin=0; class DamageSystem { class GlobalHealth { class Health { hitpoints=100000000000; healthLevels[]= { { 1, { "DZ\gear\camping\data\spotlight.rvmat" } }, { 0.69999999, { "DZ\gear\camping\data\spotlight.rvmat" } }, { 0.5, { "DZ\gear\camping\data\spotlight_damage.rvmat" } }, { 0.30000001, { "DZ\gear\camping\data\spotlight_damage.rvmat" } }, { 0, { "DZ\gear\camping\data\spotlight_destruct.rvmat" } } }; }; }; }; };
И сам скрипт полок
class Skyline_Kit_Shelf extends ItemBase { ref protected EffectSound m_DeployLoopSound; protected Object Furniture_Shelf_Kit1; void Skyline_Kit_Shelf() { RegisterNetSyncVariableBool("m_IsSoundSynchRemote"); } override void EEInit() { super.EEInit(); } override void OnItemLocationChanged( EntityAI old_owner, EntityAI new_owner ) { super.OnItemLocationChanged( old_owner, new_owner ); } override void OnVariablesSynchronized() { super.OnVariablesSynchronized(); if ( IsDeploySound() ) { PlayDeploySound(); } if ( CanPlayDeployLoopSound() ) { PlayDeployLoopSound(); } if ( m_DeployLoopSound && !CanPlayDeployLoopSound() ) { StopDeployLoopSound(); } } override void SetActions() { super.SetActions(); AddAction(ActionTogglePlaceObject); AddAction(ActionPlaceObject); } //================================================================ // ADVANCED PLACEMENT //================================================================ override void OnPlacementComplete( Man player, vector position = "0 0 0", vector orientation = "0 0 0" ) { super.OnPlacementComplete( player ); PlayerBase pb = PlayerBase.Cast( player ); if ( GetGame().IsServer() ) { PlayerBase player_base = PlayerBase.Cast( player ); vector newPosition = player_base.GetLocalProjectionPosition(); vector newOrientation = player_base.GetLocalProjectionOrientation(); Furniture_Shelf_Kit1 = GetGame().CreateObject("Skyline_Shelf", pb.GetLocalProjectionPosition(), false ); Furniture_Shelf_Kit1.SetPosition( position ); Furniture_Shelf_Kit1.SetOrientation( orientation ); } SetIsDeploySound( true ); SetLifetime(3888000); } override bool IsDeployable() { return true; } override string GetDeploySoundset() { return "putDown_FenceKit_SoundSet"; } override string GetLoopDeploySoundset() { return "BarbedWire_Deploy_loop_SoundSet"; } void PlayDeployLoopSound() { if ( GetGame().IsMultiplayer() && GetGame().IsClient() || !GetGame().IsMultiplayer() ) { m_DeployLoopSound = SEffectManager.PlaySound( GetLoopDeploySoundset(), GetPosition() ); } } void StopDeployLoopSound() { if ( GetGame().IsMultiplayer() && GetGame().IsClient() || !GetGame().IsMultiplayer() ) { m_DeployLoopSound.SoundStop(); delete m_DeployLoopSound; } } } class Skyline_Shelf_Holo extends ItemBase { override bool CanPutInCargo( EntityAI parent ) { if( !super.CanPutInCargo(parent) ) {return false;} if ( GetNumberOfItems() == 0) { return false; } return false; } override bool CanPutIntoHands(EntityAI parent) { if( !super.CanPutIntoHands( parent ) ) { return false; } if ( GetNumberOfItems() == 0 ) { return false; } return false; } } class Skyline_Shelf extends ItemBase { override bool CanPutInCargo( EntityAI parent ) { if( !super.CanPutInCargo(parent) ) {return false;} if ( GetNumberOfItems() == 0) { return false; } return false; } override bool CanPutIntoHands(EntityAI parent) { if( !super.CanPutIntoHands( parent ) ) { return false; } if ( GetNumberOfItems() == 0 ) { return false; } return false; } }
Пробовал в vihicles вместо Container_Base наследовать Inventory_Base, добавлять разные параметры из других модов которые работают, например
allowOwnedCargoManipulation = 1; hiddenSelections[] = {"placing"}; overrideDrawArea = 8; destroyOnEmpty = 0; carveNavmesh = 1; heavyItem = 1; quantityBar = 0; varQuantityMax = 0; itemBehaviour = 0; lootTag[] = {"Work"};
но всё без результатов.
Share this post
Link to post
Share on other sites