# Commands and controls

> Default player bindings, administrator access and the exact scope of Treasure Hunt's progression commands.

## Player controls

Use equipment through your inventory. The HUD shows the relevant action and key for the active tool.

<table>
<thead>
  <tr>
    <th>
      Action
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Notes
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Open the dealer
    </td>
    
    <td>
      E
    </td>
    
    <td>
      Only near the configured dealer; target interaction is also supported
    </td>
  </tr>
  
  <tr>
    <td>
      Put away detector or shovel
    </td>
    
    <td>
      X
    </td>
    
    <td>
      Uses the Treasure Hunt stow binding
    </td>
  </tr>
  
  <tr>
    <td>
      Toggle detector/shovel sound
    </td>
    
    <td>
      F9
    </td>
    
    <td>
      Applies while using the relevant tool
    </td>
  </tr>
  
  <tr>
    <td>
      Cast or finish a magnet action
    </td>
    
    <td>
      E
    </td>
    
    <td>
      Uses the configured gameplay control
    </td>
  </tr>
  
  <tr>
    <td>
      Cancel magnet fishing
    </td>
    
    <td>
      X
    </td>
    
    <td>
      Uses the configured cancel control
    </td>
  </tr>
  
  <tr>
    <td>
      Recover a diving find
    </td>
    
    <td>
      E
    </td>
    
    <td>
      Only close to a valid underwater find
    </td>
  </tr>
  
  <tr>
    <td>
      Remove scuba gear
    </td>
    
    <td>
      X
    </td>
    
    <td>
      Subject to the gear's current activity state
    </td>
  </tr>
  
  <tr>
    <td>
      Search a bin / cancel
    </td>
    
    <td>
      E / X
    </td>
    
    <td>
      Only near a supported bin; search can also use a target provider
    </td>
  </tr>
  
  <tr>
    <td>
      Close the shop
    </td>
    
    <td>
      Escape
    </td>
    
    <td>
      Returns control to the game
    </td>
  </tr>
</tbody>
</table>

FiveM key bindings can differ from these defaults. For the registered shop, tool, diving and bin commands, check **Settings → Key Bindings → FiveM**. Magnet actions use the numeric controls configured in `Config.Magnet`; detector/shovel digging also uses the gameplay control displayed by the HUD.

## Administrator commands

Run these in player chat with a leading `/`, or from the server console without `/`. The target must be an online player.

<table>
<thead>
  <tr>
    <th>
      Command
    </th>
    
    <th>
      Effect
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        /treasure_level <playerId> <level>
      </code>
    </td>
    
    <td>
      Sets the target's <strong>
        detector
      </strong>
      
       progression level
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        /treasure_skills_reset <playerId>
      </code>
    </td>
    
    <td>
      Clears learned <strong>
        detector
      </strong>
      
       skills, leaving earned XP available for redistribution
    </td>
  </tr>
</tbody>
</table>

These commands do not set or reset General, Magnet fishing, Diving or Searching bins progression. They do not clear the find album, inventory or stored scuba air.

The level must be a whole number within the configured detector progression range. Lowering it is rejected if existing skills require a higher level or spend more points than the new level allows. Reset the detector skills first when you intend to make that change.

## Access

The server console is allowed. In-game administrators need the ACE configured in `ServerConfig.Admin.ace`, defaulting to `sky_treasurehunt.admin`. For a server already using `group.admin`:

```cfg [server.cfg]
add_ace group.admin sky_treasurehunt.admin allow
```

This grants the permission to that group; it does not add a player to the group. Keep membership in your existing server permission setup. See the [FiveM access-control reference](https://docs.fivem.net/docs/server-manual/server-commands/#access-control-commands) for ACE and principal configuration.

`requireDuty` is `false` by default. If enabled, `ServerConfig.IsAdminOnDuty` must be connected to your admin system. The supplied function denies duty access until implemented. The resource has no `/treasureconfig` or Treasure Hunt `/jobconfig` command.
