Command
Executes a server console command when the reward is claimed. This is the escape hatch for granting anything the other reward types can’t: kits, ranks, custom plugin actions. Technically, all rewards can be achieved with the Command reward!
{ "type": "Command", "title": "Supply signal", "description": "", "eligiblePermissions": ["contracts.vip"], "command": "inventory.giveto supply.signal {playerId} 1", "icon": null, "iconColor": null, "iconRaw": false}Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
type | string | Exactly 'Command' |
title | string | Display name. May be empty to use the reward type's default name (recommended for most rewards). |
titleTranslations | map | null | Per-language overrides for title, mapping a language code (like "fr" or "zh-CN") to the translated text. Players whose language has no entry (matched case-insensitively, no region fallback) or a blank one see title instead. null when there are none. |
description | string | A short blurb of 1 to 3 sentences. May be empty. |
descriptionTranslations | map | null | Per-language overrides for description, mapping a language code (like "fr" or "zh-CN") to the translated text. Players whose language has no entry (matched case-insensitively, no region fallback) or a blank one see description instead. null when there are none. |
eligiblePermissions | string[] | Permission strings that gate this reward, using any-of logic: a non-empty list grants the reward to any player holding at least one of the listed permissions. An empty array means everyone is eligible. |
command | string | The console command to run when the reward is claimed. Supports runtime placeholders such as {playerId} and {playerName}. |
icon | string | null | Direct image URL for this reward's icon in the menu. Null (or omitted) keeps the default star icon, or the per-type Command override from the plugin config when one is set. |
iconColor | string | null | Color for the icon, as hex (#rrggbb or #rrggbbaa), rgb() or rgba(). Null (or omitted) inherits the per-type or default color. Invalid colors warn at plugin load and render white. |
iconRaw | boolean | Set true when the icon is a full-color image (a logo, custom art) so it renders in its own colors. When false the image renders as a solid color, which is right for monochrome icons. |
Custom icon
Section titled “Custom icon”Command rewards can grant anything, so a single default icon rarely fits. The icon,
iconColor and iconRaw fields let each reward carry its own image: a reward granting
Skill Tree XP and one granting a kit can look like what they give.
Each field falls back on its own. A null icon keeps the default image, a null
iconColor keeps the default color, and the default here means the per-type Command
entry from the plugin config’s UI icons when one is set, or the
built-in star otherwise.
Set iconRaw to true when the image is full-color (a logo, item art, a plugin’s own
icon). Without it the client renders the image as a single-color silhouette, which only
looks right for monochrome icons. A raw icon with an iconColor still gets colored, and
ineligible or locked rewards still dim.
Placeholders
Section titled “Placeholders”The command string can include these placeholders, substituted at run time:
| Placeholder | Replaced with |
|---|---|
{playerId} |
The player’s Steam ID |
{playerName} |
The player’s display name |
{qPlayerName} |
The player’s display name, wrapped in quotes |
{playerX} |
The player’s X position |
{playerY} |
The player’s Y position |
{playerZ} |
The player’s Z position |
- The command runs on the server console, with the same authority as a server admin.
- Use
{qPlayerName}when a name with spaces must be passed as a single argument. Otherwise, some command might misinterpret the player’s name as multiple arguments.
Examples
Section titled “Examples”Skill Tree XP
Section titled “Skill Tree XP”Give 1000 XP to the completing player:
givexp {playerId} 1000 falseHeli Signals
Section titled “Heli Signals”Give a hard heli signal to the completing player:
hsgive easy {playerId} 1Give weed to the completing player:
ganja.give weed low_quality 10 {playerId}XPerience
Section titled “XPerience”Give 50 XP to the completing player:
xpgive {playerId} 50Rust Items
Section titled “Rust Items”This is what the Item Reward does.
Give 500 scrap to the completing player:
inventory.giveto scraps {playerId} 500Economics Money
Section titled “Economics Money”This is what the Economics Reward does.
Give $1000 to the completing player:
deposit {playerId} 1000ServerRewards RP
Section titled “ServerRewards RP”This is what the ServerRewards Reward does.
Give 2 RP to the completing player:
rp add {playerId} 2