Compare commits

...

4 Commits

Author SHA1 Message Date
f88c409f8a docs: update ngdredemption 2025-01-28 17:19:40 -08:00
69555bb163 docs: update ngdredemption 2025-01-28 17:18:53 -08:00
977c7ecca2 docs: update ngdredemption 2025-01-28 17:16:56 -08:00
5d21756634 docs: update ngdredemption 2025-01-28 17:10:44 -08:00

View File

@ -2,7 +2,7 @@
title: ngd-redemption
description:
published: true
date: 2025-01-28T05:02:41.893Z
date: 2025-01-29T01:19:38.622Z
tags:
editor: markdown
dateCreated: 2025-01-28T00:30:34.910Z
@ -22,13 +22,13 @@ dateCreated: 2025-01-28T00:30:34.910Z
## Installation Steps
1. **Install ngd-Bridge**
1. ### **Install ngd-Bridge**
Follow the guide to install ngd-Bridge [HERE](https://nemesisdocs.com/en/gettingstarted).
2. **Install ngd-redemption**
Place `ngd-redemption` into your **[ngd]** folder. This script must be started **after** `ngd-Bridge`.
2. ### **Install ngd-redemption**
Download and place `ngd-redemption` **AND** `ngd-interactiondialog` into your **[ngd]** folder. This script must be started **after** `ngd-Bridge`.
3. **Modify Tebex Listings**
3. ### **Modify Tebex Listings**
<details>
<summary><strong>Add Commands</strong> (Click to Expand)</summary>
@ -48,9 +48,9 @@ NGDRedemption {packageId} {transaction}
</details>
4. **Configure Packages In Script**
4. ### **Configure Packages In Script**
<details>
<summary><strong>Script Configuration</strong> (Click to Expand)</summary>
<summary><strong>Package Configuration</strong> (Click to Expand)</summary>
- **In a web browser, navigate to your Tebex package.**
-- The #s seen at the end of the link are the `Package ID`, and will be used to configure the items in the script.
@ -90,85 +90,106 @@ Config.Packages = {
}
}
```
- If the `Item = 'other` is set, you can set your own logic to give players whatever you would like inside of the `editableserver.lua` using the function:
```lua
function GiveCustom(data)
end
```
</details>
5. Add the jobs into your framework.
5. ### **Set Garages**
<details>
<summary><strong>Job Configuration (QB/QBX)</strong> (Click to Expand)</summary>
<summary><strong>Garage Configuration</strong> (Click to Expand)</summary>
## QB (old jobs.lua)
```lua
```
## QB (new jobs.lua)
```lua
```
## QBX
```lua
```
> You MUST set your garage in the `editableserver.lua` file. If you need help, open a ticket in our [Discord](https://discord.gg/AnXx2GVGcM)
{.is-warning}
- Set your garage name/id in the `Config.GarageName` to ensure the vehicles are put into the correct garage!
- The script comes pre-configured for JG and CD garages. If you don't use these, make sure you set your garage configuration in the `editableserver.lua` file.
</details>
5. ### **Test Drives**
<details>
<summary><strong>Job Configuration (ESX)</strong> (Click to Expand)</summary>
<summary><strong>Test Drive Configuration</strong> (Click to Expand)</summary>
## (If this doesn't work for you, you will need to build them manually into your modified database)
### Test Drives (Optional)
```sql
- The script comes with an optional 'test drive' feature that allows you to make it so players can test drive premium vehicles before purchasing them on your Tebex store.
```
</details>
6. Add the items into your framework/inventory.
<details>
<summary><strong>Items List (OX)</strong> (Click to Expand)</summary>
- This is enabled by default, and all you have to do is configure what vehicles you want, their label that will show up in the menu and the locations where the player is teleported back when the test drive is complete.
```lua
Config.TestDrives = {
Enabled = true,
Time = 2, --minutes
SpawnLocation = vector4(-1319.23, -2181.06, 13.94, 152.21),
ReturnLocation = vector4(158.26, -739.98, 246.15, 66.94),
Vehicles = {
['zentorno'] = {
Label = 'Zentorno'
},
['faggio'] = {
Label = 'Awesome Moped'
}
}
}
```
</details>
<details>
<summary><strong>Items List (QB-NEW)</strong> (Click to Expand)</summary>
---
- You must also set your vehicle keys and fuel in the following configs. The plate doesn't need to be changed unless you want it to.
```lua
--Fuel System:
Config.VehicleFuel = function(vehicle)
Entity(vehicle).state.fuel = 100
end
--Keys System:
Config.TestDriveVehicleKeys = function(vehicle, plate)
exports['ngd-smallresources']:GiveLogicalKey(plate)
end
--Plate
Config.TestDriveVehiclePlate = function(vehicle)
local uniquePlate = 'Prem' .. math.random(1000, 9999)
SetVehicleNumberPlateText(vehicle, uniquePlate)
end
```
</details>
5. ### **LOGS**
<details>
<summary><strong>Items List (QB-OLD)</strong> (Click to Expand)</summary>
<summary><strong>Logs Configuration</strong> (Click to Expand)</summary>
- The script comes pre-configured for either Discord or Fivemerr logs. Choose your log type in the config and follow the instructions below to configure it.
### Discord:
- To use the discord logging feature, set the `Config.LogType = 2`, and add your webhook into the top of the `editableserver.lua` file.
### Fivemerr:
- To use the Fivemerr logs, set the `Config.LogType = 1'.
- Open your `server.cfg` and add the following:
```lua
set fivemerr_ngdredemption 'YOUR_API_KEY'
```
- Replace `YOUR_API_KEY` with your API key from the Fivemerr dashboard.
### Custom / No Logs:
- To use your own logging logic, or to use no logs at all, set the `Config.LogType = 0'
- If you wish to use your own logic, you can add it into the following function found inside the `editableserver.lua`
```lua
function CustomLogs(data, message)
end
```
</details>
---
# Configuration Notes
- **Extensive Configuration Options**
Open and configure all the `Config` files to match your server's settings.
- **Customizable Menu Images**
The images used in the menus can be replaced. They are located in the `web/menuimages` folder.
# Translations
- Make sure you review the `translate.lua` file, as this is where you will be able to set the name of your store, garage information, etc.
---
> Do you still need help? Open a ticket in our [Discord](https://discord.gg/AnXx2GVGcM)
{.is-warning}