# ▸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 },
} )
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://arivia.rlib.io/developers/entities/customhideunavail.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
