# Client

## Exports (General)

List of general exports.

### GetPlayerGang

{% hint style="info" %}
**SHARED SIDE**
{% endhint %}

This export returns the gang the specified player is a member of.

#### Example code

{% code title="client.lua" overflow="wrap" lineNumbers="true" %}

```lua
exports['rcore_gangs']:GetPlayerGang()
```

{% endcode %}

Return:

* gang?: `table`
  * id: `number`
    * `number`: The id of the gang
  * tag: `string`
    * `string`: The gang tag
  * name: `string`
    * `string`: The gang name
  * color: `string`
    * `string`: The gang color
  * identifier: `number` or `string`
    * `number`: The identifier of the gang leader
    * `string`: The identifier of the gang leader
  * members: `table[]`
    * `table`: The list of all gang members
      * name: `string`
        * `string`: The ingame character name of the gang member
      * rank: `string`
        * `string`: The rank of the gang member
      * access: `boolean`
        * `boolean`: Whether or not the gang member has priviliged rank
      * identifier: `number` or `string`
        * `number`: The identifier of the gang member
        * `string`: The identifier of the gang member
  * vehicles: `table[]`
    * `table`: The list of all gang vehicles
      * model: `number`
        * `number`: The model hash of the gang vehicle
      * color: `number`
        * `number`: The color index of the gang vehicle
  * garage?: `vec3`
    * `vec3`: The position of the gang garage
  * storage?: `vec3`
    * `vec3`: The position of the gang storage
  * rank: `string`
    * `string`: The rank of the specified player in the gang
  * access: `boolean`
    * `boolean`: Whether or not the specified player has priviliged rank
  * superaccess: `boolean`
    * `boolean`: Whether or not the specified player is the leader of the gang

### GetZoneAtPosition

{% hint style="info" %}
**SHARED SIDE**
{% endhint %}

This export returns the gang zone located in the specified position.

#### Example code

{% code title="client.lua" overflow="wrap" lineNumbers="true" %}

```lua
exports['rcore_gangs']:GetZoneAtPosition(position)
```

{% endcode %}

Parameter:

* position: `vec3`
  * `vec3`: The position of the zone

Return:

* zone?: `table`
  * name: `string`
    * `string`: The name of the zone
  * label: `string`
    * `string`: The label of the zone
  * neighbors: `table[]`
    * `table`: The list of all the neighboring zones
  * drugPreference: `table`
    * `table`: The multipliers for each drug category in the zone
      * CATEGORY\_LOW: `number`:
        * `number`: The multiplier for low drug category
      * CATEGORY\_MED: `number`:
        * `number`: The multiplier for medium drug category
      * CATEGORY\_HIGH: `number`:
        * `number`: The multiplier for high drug category

### IsPlayerBagged

{% hint style="info" %}
**SHARED SIDE**
{% endhint %}

This export returns whether the specified player has paper bag on or not.

#### Example code

{% code title="client.lua" overflow="wrap" lineNumbers="true" %}

```lua
exports['rcore_gangs']:IsPlayerBagged(src)
```

{% endcode %}

Parameter:

* src: `number`
  * `number`: The source of the player (server identifier)

Return:

* check: `boolean`
  * `boolean`: Whether or not the player has paper bag on

### IsPlayerRestrained

{% hint style="info" %}
**SHARED SIDE**
{% endhint %}

This export returns whether the specified player has zip ties on or not.

#### Example code

{% code title="client.lua" overflow="wrap" lineNumbers="true" %}

```lua
exports['rcore_gangs']:IsPlayerRestrained(src)
```

{% endcode %}

Parameter:

* src: `number`
  * `number`: The source of the player (server identifier)

Return:

* check: `boolean`
  * `boolean`: Whether or not the player has zip ties on

### IsPlayerEscorted

{% hint style="info" %}
**SHARED SIDE**
{% endhint %}

This export returns whether the specified player is being escorted or not.

#### Example code

{% code title="client.lua" overflow="wrap" lineNumbers="true" %}

```lua
exports['rcore_gangs']:IsPlayerEscorted(src)
```

{% endcode %}

Parameter:

* src: `number`
  * `number`: The source of the player (server identifier)

Return:

* check: `boolean`
  * `boolean`: Whether or not the player is being escorted
