---
name: "BIS_fnc_respawnTickets"
type: function
status: ok
groups: ["Respawn"]
arma3_since: "0.74"
locality: {"argument": null, "effect": "global", "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_respawnTickets
revid: 364273
updated: 2024-05-06T09:38:31Z
---

# BIS_fnc_respawnTickets

*Function · Respawn · Arma 3 v0.74*

Locality: effect **global**

## Description

Manage respawn tickets used by Tickets respawn template.

When player dies, number of tickets is decreased by 1. The most local tickets are always used. Example: When you first add tickets to player's side, they will be affected. If you later define tickets also to player's group, they will completely replace the side tickets.

When player runs out of the tickets, his respawn is disabled. If you use also *EndMission* respawn template, the mission will automatically end once tickets in all name spaces are exhausted.

## Syntax

### Syntax 1

```sqf
[target, tickets, dynamicTarget] call BIS_fnc_respawnTickets
```

**Parameters:**

- **target**: Receiver of the respawn tickets. Can be of type:
  - [Namespace](../topics/Namespace.md) - use [missionNamespace](../commands/missionNamespace.md) to set/get global tickets available for everyone
  - [Side](../topics/Side.md)
  - [Group](../topics/Group.md)
  - [Object](../topics/Object.md)
- **tickets**: [Number](../topics/Number.md) - added respawn tickets. When missing or set to 0, number of tickets won't be affected, which means you can use the function to simply get amount of tickets.
- **dynamicTarget**: [Boolean](../topics/Boolean.md) - when [true](../commands/true.md), set/get tickets based on the target. **target** must be an [Object](../topics/Object.md).

**Returns:** [Number](../topics/Number.md) - remaining tickets after adjustment

### Syntax 2

```sqf
[] call BIS_fnc_respawnTickets
```

**Returns:** [Number](../topics/Number.md) - remaining tickets in all name spaces

## Examples

### Example 1

Add 5 tickets for BLUFOR:

```sqf
[west, 5] call BIS_fnc_respawnTickets;
```

### Example 2

Return number of global tickets:

```sqf
_globalTickets = [missionNamespace] call BIS_fnc_respawnTickets;
```

### Example 3

Return number of player's tickets:

```sqf
_playerTickets = [player, nil, true] call BIS_fnc_respawnTickets;
```

## See also

Arma 3: Respawn · [BIS_fnc_addRespawnPosition](../functions/BIS_fnc_addRespawnPosition.md) · [BIS_fnc_removeRespawnPosition](../functions/BIS_fnc_removeRespawnPosition.md)

<sub>Source: [BI Community Wiki — BIS fnc respawnTickets](https://community.bistudio.com/wiki/BIS_fnc_respawnTickets) (revision 364273).</sub>
