To deliver items, ranks, or currency to players when they purchase from your store, you need to set up a product with a custom field for the player’s FiveM ID and attach a FiveM benefit with the commands to execute.Documentation Index
Fetch the complete documentation index at: https://docs.rmz.gg/llms.txt
Use this file to discover all available pages before exploring further.
Step 1: Add a Custom Field
When creating or editing a product in your RMZ dashboard, add a custom field that asks the customer for their FiveM identifier.| Field Setting | Example Value |
|---|---|
| Field name | FiveM ID or Steam ID |
| Field type | Text input |
| Required | Yes |
{player_id} variable.
Step 2: Create a FiveM Benefit
- In your dashboard, go to Benefits > Create Benefit
- Select type FiveM Commands
- Select the target server(s) where commands should execute
- Enter the commands to run when a purchase is completed
Command Variables
Use these variables in your commands — they are replaced automatically with the actual values at execution time:| Variable | Description | Example Value |
|---|---|---|
{player_id} | Player identifier from the custom field | steam:110000xxxxxxxxx |
{order_id} | RMZ order ID | 1234 |
{product_id} | Product ID | 56 |
{product_name} | Product name | VIP Package |
{quantity} | Purchased quantity | 1 |
Command Examples
Revoke Commands (Optional)
Define commands that execute automatically when an order is refunded or cancelled. This lets you undo the benefits that were given.Revoke commands use the same variables as regular commands. They are executed on the same server(s) configured in the benefit.
Step 3: Attach the Benefit to Your Product
After creating the FiveM benefit:- Go to the product settings
- In the Benefits section, attach the FiveM benefit you created
- Save the product
Full Example
A “VIP Package” product setup:| Configuration | Value |
|---|---|
| Product name | VIP Package |
| Custom field | ”FiveM ID” (required text field) |
| Benefit type | FiveM Commands |
| Target server | My FiveM Server |
| Commands | /give_vip {player_id} and /add_cash {player_id} 10000 |
| Revoke commands | /remove_vip {player_id} and /remove_cash {player_id} 10000 |

