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
ProbusBoss

Возможность взять предмет

Делаю мебель, до этого были проблемы с ганраком, помогли. По аналогии сделал полку для ящиков, а тут такая проблема, что его можно взять в руки. Как исправить?
 

class CfgVehicles {
	class Inventory_Base;
	class Container_Base;
	
	class WoodenCrate : Container_Base {
		inventorySlot[] = {"WoodenCrate", "WoodenCrate1", "WoodenCrate2", "WoodenCrate3", "WoodenCrate4", "WoodenCrate5"};
	};
	
	class shelf3_kit : Inventory_Base {
		scope = 2;
		displayName = "кит shelf";
		descriptionShort = "кит описание shelf";
		model = "\Probus_fur\shelfs\shelf3\shelf3_kit.p3d";
		allowOwnedCargoManipulation = 1;
		hiddenSelections[] = {"placing"};
		hologramMaterial = "fishnettrap";
		hologramMaterialPath = "dz\gear\traps\data";
		overrideDrawArea = 8;
		forceFarBubble = "true";
		destroyOnEmpty = 0;
		carveNavmesh = 1;
		heavyItem = 1;
		weight = 8000;
		itemSize[] = {6, 3};
		itemBehaviour = 0;
		physLayer = "item_large";
		lootTag[] = {"Work"};
		
		class AnimationSources {
			class inventory {
				source = "user";
				animPeriod = 0.01;
				initPhase = 0;
			};
			
			class placing {
				source = "user";
				animPeriod = 0.01;
				initPhase = 1;
			};
		};
	};
	
	class shelf3: Inventory_Base {
		scope = 2;
		displayName = "стеллаж";
		descriptionShort = "стеллаж описание";
		attachments[]=
		{
			"WoodenCrate1",
			"WoodenCrate2",
			"WoodenCrate3",
			"WoodenCrate4",
			"WoodenCrate5"
		};
		model = "\Probus_fur\shelfs\shelf3\shelf3.p3d";
		allowOwnedCargoManipulation = 1;
		overrideDrawArea = 8;
		forceFarBubble = "true";
		destroyOnEmpty = 0;
		quantityBar = 0;
		varQuantityMax = 0;
		carveNavmesh = 1;
		canBeDigged = 0;
		heavyItem = 1;
		weight = 8000;
		itemSize[] = {10, 10};
		itemBehaviour = 0;
		physLayer = "item_large";
		lootTag[] = {"Work"};

		
		class DamageSystem {
			class GlobalHealth {
				class Health {
					hitpoints = 800000;
					healthLevels[] = {{1, {"DZ\gear\containers\data\Barrel_green.rvmat"}}, {0.7, {"DZ\gear\containers\data\Barrel_green.rvmat"}}, {0.5, {"DZ\gear\containers\data\Barrel_green_damage.rvmat"}}, {0.3, {"DZ\gear\containers\data\Barrel_green_damage.rvmat"}}, {0, {"DZ\gear\containers\data\Barrel_green_destruct.rvmat"}}};
				};
			};
			
			class GlobalArmor {
				class Projectile {
					class Health {
						damage = 0;
					};
					
					class Blood {
						damage = 0;
					};
					
					class Shock {
						damage = 0;
					};
				};
			};
		};
		
		class GUIInventoryAttachmentsProps {
			class Shelf3_1 {
				name = "1 полка";
				description = "";
				attachmentSlots[] = {"WoodenCrate5"};
				icon = "cat_common_cargo";
				selection = "inventory";
			};
			
			class Shelf3_2 {
				name = "2 полка";
				description = "";
				attachmentSlots[] = {"WoodenCrate4"};
				icon = "cat_common_cargo";
				selection = "inventory";
			};
			
			class Shelf3_3 {
				name = "3 полка";
				description = "";
				attachmentSlots[] = {"WoodenCrate3"};
				icon = "cat_common_cargo";
				selection = "inventory";
			};
			
			class Shelf3_4 {
				name = "4 полка";
				description = "";
				attachmentSlots[] = {"WoodenCrate2"};
				icon = "cat_common_cargo";
				selection = "inventory";
			};
			
			class Shelf3_5 {
				name = "5 полка";
				description = "";
				attachmentSlots[] = {"WoodenCrate1"};
				icon = "cat_common_cargo";
				selection = "inventory";
			};
		};
		
		class Cargo {
			itemsCargoSize[] = {0, 0};
			openable = 0;
			allowOwnedCargoManipulation = 1;
		};
	};
};

class CfgNonAIVehicles {
	class ProxyAttachment;
	
	class Proxyw_crate1 : ProxyAttachment {
		scope = 2;
		inventorySlot = "WoodenCrate1";
		model = "Probus_fur\proxy\w_crate1.p3d";
	};

	class Proxyw_crate2 : ProxyAttachment {
		scope = 2;
		inventorySlot = "WoodenCrate2";
		model = "Probus_fur\proxy\w_crate2.p3d";
	};
	
	class Proxyw_crate3 : ProxyAttachment {
		scope = 2;
		inventorySlot = "WoodenCrate3";
		model = "Probus_fur\proxy\w_crate3.p3d";
	};
	
	class Proxyw_crate4 : ProxyAttachment {
		scope = 2;
		inventorySlot = "WoodenCrate4";
		model = "Probus_fur\proxy\w_crate4.p3d";
	};
	
	class Proxyw_crate5 : ProxyAttachment {
		scope = 2;
		inventorySlot = "WoodenCrate5";
		model = "Probus_fur\proxy\w_crate5.p3d";
	};
};

class CfgSlots {
	
	class Slot_WoodenCrate1 {
		name = "WoodenCrate1";
		displayName = "WoodenCrate1";
		ghostIcon = "woodcrate";
	};
	
	class Slot_WoodenCrate2 {
		name = "WoodenCrate2";
		displayName = "WoodenCrate2";
		ghostIcon = "woodcrate";
	};
	
	class Slot_WoodenCrate3 {
		name = "WoodenCrate3";
		displayName = "WoodenCrate3";
		ghostIcon = "woodcrate";
	};
	
	class Slot_WoodenCrate4 {
		name = "WoodenCrate4";
		displayName = "WoodenCrate4";
		ghostIcon = "woodcrate";
	};
	
	class Slot_WoodenCrate5 {
		name = "WoodenCrate5";
		displayName = "WoodenCrate5";
		ghostIcon = "woodcrate";
	};
};

 

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

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

скриптово добавляется класс для объекта и добавляется запрет на взятие в руки насколько знаю, могу ошибаться

Share this post


Link to post
Share on other sites



  • 0

С ганраком при этом все нормально, cfg почти одинаковые

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

Share this post


Link to post
Share on other sites
  • 0
31.01.2021 в 20:29, ProbusBoss сказал:

видимо, не будет помощи

class //Ваш класснейм// extends //Класснейм родителя//
{
    override bool CanPutIntoHands( EntityAI parent )
    {
        return false;
    }
    override bool CanPutInCargo( EntityAI parent )
    {
        return false;
    }
    bool CanBePacked()
    {        
        return false;
    }
    
    bool CanBeManipulated()
    {
        return false;
    }
};

 

Edited by Denis1979 (see edit history)

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.