I personally don't like this approach as customers often make errors when entering their CSN but this script does have a fallback when a customer enters an invalid CSN (outlined below). I recommend issuing for redemption / collection but I've included this option should you wish to use it.
Creating the Tebex Package for Automatic Aircraft Addition
Configuring the Deliverable (Automatic Aircraft Addition)
Click Add Deliverable.
Select Game Server Commands.
Under Game Servers, select your game server.
Command Configuration
Under When the package is purchased, enter a variation of the following command:
Replace aircraftmodel with the aircraft spawn name.
Additional Settings
Game Server to Execute On:
Select your server
Require Player to Be Online:
Save and publish the package.
Once published, customers will be prompted to enter their CSN during purchase, and the aircraft will be automatically added to the configured auto-added aircraft garage Config.AutoAddedAircraftGarage . If the player is online they'll be notified of this in game.
Fallback: Invalid CSN Handling
If a customer enters an invalid CSN during purchase:
The script will automatically detect the issue.
The purchase will be added to the tebexfailed table in your database.
Claiming a Failed Purchase
The player can manually claim the aircraft using the /claim command followed by the Tebex transaction ID.
Example:
The aircraft will then be made collectible or redeemable, depending on your configuration.
Important:
Aircraft must either:
Be redeemable via /redeem, or
Have a configured aircraft collection location set in the script configuration.
Issuing Aircraft for Redemption / Collection Only
If you want aircraft to be issued only for redemption via /redeem or collection from a configured location, the CSN variable is not required. Customers will not need to enter their CSN during purchase.
Creating the Tebex Package for Aircraft Redemption / Collection
Create a new Tebex package.
Add an appropriate title, description, and image.
Add a Game Server Commands deliverable.
Under Game Servers, select your game server.
Command Configuration
Under When the package is purchased, enter a variation of the following command:
Replace aircraftmodel with the aircraft spawn name.
Additional Settings
Game Server to Execute On:
Select your server
Require Player to Be Online:
Save and publish the package.
Once published, the aircraft will be available for redemption via /redeem or collection from a configured aircraft collection location, depending on your script configuration. The player will be notified that this is available in game.