> For the complete documentation index, see [llms.txt](https://arivia.rlib.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://arivia.rlib.io/developers/entities/customhideunavail.md).

# ▸customHideUnavail

## Alias

&#x20;           *`customHideUnavail, bHideUnavail`*

## Source

&#x20;           *`added in Arivia v3`*

## Requires

&#x20;           *`entity must have valid CustomCheck`*

## Type

&#x20;           *`boolean ( true, false )`*

## Info

Arivia includes a setting called `cfg.tabs.entities.bHideUnavail` within **lua\modules\arivia\cfg\sh\_4\_tabs.lua** which makes entities appear in the F4 menu as faded if the player is not allowed to buy them.

If you wish to keep that on, however, hide entities that you've supplied CustomChecks for; and wish for those specific items to not show at all if the player cannot afford them, you can provide the **customHideUnavail** field to each entity.&#x20;

If **customHideUnavail** is provided for an item; it will ONLY appear in the F4 menu if the player should be able to buy it.

## Example

{% tabs %}
{% tab title="entities.lua" %}

```lua
DarkRP.createEntity( 'Acetone',
{
	ent 			        = 'bp_chemical_acet2',
	model 			      = 'models/blues_pharm/jar_3.mdl',
	price 			      = 750,
	max 			        = 2,
	cmd 			        = 'bpbuyacet',
	category 		      = 'Blue\'s Pharmaceuticals',
	customHideUnavail = true,
	customCheck = function( ply ) return
		table.HasValue( { TEAM_Pharmaceutica }, ply:Team( ) )
	end,
	CustomCheckFailMsg = 'Must be a Pharmacist',
} )
```

{% endtab %}
{% endtabs %}

If you wish to hide entities all-together when they are not purchasable; open **lua\modules\arivia\cfg\sh\_4\_tabs.lua** and set `cfg.tabs.entities.bHideUnavail = true`

## Notes

An alternative to using *customHideUnavail* + *CustomCheck* is to use **allowed** instead.

```lua
DarkRP.createEntity( 'Acetone',
{
	ent 			  = 'bp_chemical_acet2',
	model 			= 'models/blues_pharm/jar_3.mdl',
	price 			= 750,
	max 			  = 2,
	cmd 			  = 'bpbuyacet',
	category 		= 'Blue\'s Pharmaceuticals',
	allowed			= { TEAM_Pharmaceutica },
} )
```
