Skip to content
Contractsv1.7.0

Command

⭐ Premium

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"
}
FieldTypeDescription
typestringExactly 'Command'
titlestringDisplay name. May be empty to use the reward type's default name (recommended for most rewards).
descriptionstringA short blurb of 1 to 3 sentences. May be empty.
eligiblePermissionsstring[]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.
commandstringThe console command to run when the reward is claimed. Supports runtime placeholders such as {playerId} and {playerName}.

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.

Give 1000 XP to the completing player:

givexp {playerId} 1000 false

Give a hard heli signal to the completing player:

hsgive easy {playerId} 1

Give weed to the completing player:

ganja.give weed low_quality 10 {playerId}

Give 50 XP to the completing player:

xpgive {playerId} 50

This is what the Item Reward does.

Give 500 scrap to the completing player:

inventory.giveto scraps {playerId} 500

This is what the Economics Reward does.

Give $1000 to the completing player:

deposit {playerId} 1000

This is what the ServerRewards Reward does.

Give 2 RP to the completing player:

rp add {playerId} 2