---
name: "publicVariableClient"
type: command
status: ok
groups: ["Multiplayer", "Variables"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/publicVariableClient
revid: 379458
updated: 2026-10-31T00:09:12Z
---

# publicVariableClient

*Command · Multiplayer, Variables · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.62*

## Description

Send the variable value to the client computer - same limitations regarding variable type as [publicVariable](../commands/publicVariable.md#description).

The Client ID is the temporary ID given to a connected client for that session. You can find out this ID with the [owner](../commands/owner.md) command (using it on a player's character, for example, will give you that players client ID).

> [!NOTE]
> **Arma 3:** In Arma 3 it is possible to broadcast [nil](../commands/nil.md) value

## Syntax

```sqf
clientID publicVariableClient varName
```

**Parameters:**

- `clientID`: [Number](../topics/Number.md)
- `varName`: [String](../topics/String.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
3 publicVariableClient "CTFscoreOne";
```

## See also

[clientOwner](../commands/clientOwner.md) · [owner](../commands/owner.md) · [publicVariable](../commands/publicVariable.md) · [publicVariableServer](../commands/publicVariableServer.md) · [addPublicVariableEventHandler](../commands/addPublicVariableEventHandler.md) · [remoteExecutedOwner](../commands/remoteExecutedOwner.md)

## Community notes

**Kylania** — 2012-08-24

publicVariableServer (run on client)\
publicVariableClient (run on server)

Publishes a variable (name as STRING) to a specific client, from the server. This is useful where you want to synchronize a variable with only a specific client.

This is a useful way to cut down on network traffic, as publicVariable commands are issued as a priority message. So use publicVariable sparingly, and these commands where they apply. - [Rocket](http://forums.bistudio.com/showthread.php?136494-ARMA-2-OA-beta-build-94209-(1-60-MP-compatible-build-post-1-60-release)&p=2179795&viewfull=1#post2179795)

---

**Killzone_Kid** — 2013-09-21

While [publicVariable](../commands/publicVariable.md) is JIP compatible and persistent, [publicVariableClient](../commands/publicVariableClient.md) is not. If you log out then log in with the same owner id the public variable sent to your client prior will be [nil](../commands/nil.md).

```sqf
//server
pv = 123;
3 publicVariableClient "pv";
//connected client with id 3
hint str pv; //123
//
//client log out/log in
//
//client id is still 3
hint str pv; //error, undefined variable pv
```

---

**Killzone_Kid** — 2015-04-12

Tested in Arma 3 v1.43, [publicVariableClient](../commands/publicVariableClient.md) works client-to-client if [owner](../commands/owner.md) id of the targeted client is known.

<sub>Source: [BI Community Wiki — publicVariableClient](https://community.bistudio.com/wiki/publicVariableClient) (revision 379458).</sub>
