Skip to content

Commit 95a2d7d

Browse files
committed
Added configure-your-script category
1 parent 89c3fe3 commit 95a2d7d

File tree

8 files changed

+375
-0
lines changed

8 files changed

+375
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
collapsible: true
2+
collapsed: true
3+
link:
4+
type: generated-index
5+
description: "Important information on how to get started with configure your IT scripts"
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"how-to-set-webhook-system": {
3+
"title": "Hot to set webhook system",
4+
"theme": {
5+
"footer": false
6+
}
7+
},
8+
"how-to-enable-target-system": {
9+
"title": "Hot to enable target system",
10+
"theme": {
11+
"footer": false
12+
}
13+
},
14+
"how-to-anaging-translations": {
15+
"title": "How to manage translations",
16+
"theme": {
17+
"footer": false
18+
}
19+
},
20+
"how-to-change-notifications": {
21+
"title": "Hot to change notifications",
22+
"theme": {
23+
"footer": false
24+
}
25+
},
26+
"how-to-change-keybinds": {
27+
"title": "How to change keybinds",
28+
"theme": {
29+
"footer": false
30+
}
31+
},
32+
"how-to-execute-commands": {
33+
"title": "How to execute commands",
34+
"theme": {
35+
"footer": false
36+
}
37+
}
38+
}
39+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: it-scripts - How to anaging translations
3+
description: This guide will help you manage translations in your it-scripts assets.
4+
---
5+
6+
import { Steps } from 'nextra/components'
7+
8+
# How to anaging translations
9+
10+
## Translation System
11+
All it-scripts assets are designed with multilingual support to help you adapt them to your preferred language.
12+
Translations are stored in a folder called local, making it easy to manage and customize the language of your assets.
13+
14+
## Where To Find Translations
15+
- The translations are located in the **local** folder of your it-scripts assets.
16+
- In some cases, translation strings might be stored in other configurable files. Be sure to check these files when translating your asset.
17+
18+
## Pre-Built Translations
19+
Every it-scripts asset comes with pre-built translations for German and English, allowing you to get started quickly.
20+
21+
If you want translations in other languages, you have two options:
22+
23+
<Steps>
24+
25+
### Translate it yourself
26+
You can modify the translation files directly to suit your language.
27+
28+
### Join our Discord community
29+
Gain access to a variety of translation files shared by other customers, covering multiple languages.
30+
31+
</Steps>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: it-scripts - How to change key bindings
3+
description: This guide will help you change key bindings for your it-scripts assets.
4+
---
5+
6+
import { Steps } from 'nextra/components'
7+
import { Callout } from '@components/Callout'
8+
9+
# How to change kay bindings
10+
11+
## Register Key Mapping
12+
<Callout type="info">
13+
The new keybinds will apply only to new players or those who reset their keybinds manually.
14+
</Callout>
15+
To properly organize your keybinds and optimize your resource, we’ve adopted the FiveM native RegisterKeyMapping.
16+
This eliminates the need for constant checks (while loops) for key presses, significantly improving performance.
17+
This native works by triggering the associated chat command whenever the keybind is pressed.
18+
19+
<Steps>
20+
### Optimized performance
21+
Reduces resource usage by removing frame-by-frame checks.
22+
23+
### Client customization
24+
Players can now change their own keybinds directly in-game.
25+
</Steps>
26+
27+
## How to Change Keys In-Game
28+
<Steps>
29+
### Open the Settings Menu
30+
Navigate to the **settings** menu in GTAV.
31+
32+
### Go to Key Bindings
33+
Under **settings**, find and select **key bindings** section.
34+
35+
### Select FiveM Key Bindings
36+
Scroll to the **FiveM** section where all FiveM-related keybinds are listed.
37+
38+
## Adjust Key Bindings
39+
Select the desired keybind you want to change and press the new key you wish to assign.
40+
</Steps>
41+
42+
## How to Reset Keybinds
43+
If you need to reset your keybinds, there are two options:
44+
45+
<Steps>
46+
### Using Console
47+
Open the F8 console and type this, example: unbind keyboard f10.
48+
```
49+
unbind keyboard [key]
50+
```
51+
### Editing Configuration File
52+
- Press **WINDOWS + R** to open the Run dialog.
53+
- Type `%appdata%\CitizenFX` and press Enter.
54+
- Open the **fivem.cfg** file in a text editor.
55+
- Remove the lines related to the keybind you want to reset.
56+
- Save the file and restart FiveM.
57+
</Steps>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: it-scripts - How to change notifications
3+
description: This guide will help you change notifications for your it-scripts assets.
4+
---
5+
6+
import { Steps } from 'nextra/components'
7+
8+
# How to change notifications
9+
## Change Notifications
10+
11+
Configuring notifications in it-scripts assets is simple and straightforward.
12+
Notifications are used to display information, successes, and errors in-game.
13+
All it-scripts assets share the same notification system, ensuring consistency across different scripts.
14+
15+
<Steps>
16+
### Delete notifications
17+
Delete the current notification logic inside the **ShowNotification** function.
18+
19+
### Add your own notification logic
20+
Manually add your desired notification export or method.
21+
22+
### Always test with backups
23+
Always test your changes with backups to ensure everything works as expected.
24+
</Steps>
25+
26+
### Editing Notifications
27+
All configurable notifications are located in `shared/functions.lua` in this file, you’ll find the ShowNotification function, which controls how notifications are displayed.
28+
29+
If you want to customize the notification system or integrate a new one, you can do so by editing the ShowNotification function. Below is an example of how to modify it for a new system:
30+
```lua
31+
function ShowNotification(source, message, type)
32+
-- Bridge.Functions.Notify(message, type) are the default Framework notifications
33+
-- You can change this to your own notification systems
34+
if source ~= nil then -- Server Messages
35+
if type == 'Error' then
36+
exports.it_bridge:SendNotification(source, 'it-drugs', message, 5000, "Error", true)
37+
elseif type == 'Success' then
38+
exports.it_bridge:SendNotification(source, 'it-drugs', message, 5000, "Success", true)
39+
else
40+
exports.it_bridge:SendNotification(source, 'it-drugs', message, 5000, "Info", false)
41+
end
42+
else -- Client Messages
43+
if type == 'Error' then
44+
exports.it_bridge:SendNotification('it-drugs', message, 5000, "Error", true)
45+
elseif type == 'Success' then
46+
exports.it_bridge:SendNotification('it-drugs', message, 5000, "Success", true)
47+
else
48+
exports.it_bridge:SendNotification('it-drugs', message, 5000, "Info", false)
49+
end
50+
end
51+
end
52+
```
53+
This example uses the `it_bridge` notification system, but you can replace it with any other notification system you prefer.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: it-scripts - How to enable target system
3+
description: This guide will help you enable the target system for your it-scripts assets.
4+
---
5+
6+
import { Steps } from 'nextra/components'
7+
import ExternLink from '@components/ExternLink'
8+
import {IconBrandGithub} from '@tabler/icons-react'
9+
10+
# How to enable target system
11+
12+
## Target System
13+
All it-scripts assets use the same target system for consistency and ease of use.
14+
To prevent errors, we have standardized the configuration and provided clear options for supported systems.
15+
16+
## Supported Target Systems
17+
We are compatible with the following target systems:
18+
19+
<Steps>
20+
### ox_target
21+
The most stable and reliable target system currently available.
22+
<ExternLink
23+
href="https://github.com/overextended/ox_target"
24+
icon ={<IconBrandGithub size={16} />}
25+
manualTitle="ox_target GitHub Repository"
26+
></ExternLink>
27+
28+
### qb-target
29+
Another widely used and supported system.
30+
<ExternLink
31+
href="https://github.com/qbcore-framework/qb-target"
32+
icon ={<IconBrandGithub size={16} />}
33+
manualTitle="qb-target GitHub Repository"
34+
></ExternLink>
35+
</Steps>
36+
37+
Please always keep your targets updated to the latest available version.
38+
39+
## How To Enable The Target System
40+
All it-scripts assets come with built-in support for target systems, allowing for seamless interaction with entities, objects, and more within your server.
41+
This configuration provides flexibility by supporting the two most popular target systems in FiveM: ox_target and qb-target.
42+
43+
<Steps>
44+
### Find the it_bridge asset
45+
- Locate the **it_bridge** asset in your server's resources folder.
46+
- This asset serves as a bridge for all it-scripts and is essential for enabling the target system.
47+
48+
### Locate the config.lua file
49+
- Inside the **it_bridge** asset, find the **config.lua** file.
50+
- This file contains the configuration settings for the target system.
51+
52+
### Enable the Target System
53+
Look for the following configuration line in config.lua:
54+
```lua
55+
--[[
56+
Supported interactions:
57+
* AUTO_DETECT: auto-detect interactions [Only detecting supported interactions below]
58+
* Interactions.OX: ox_target,
59+
* Interactions.QB: qb-target,
60+
* Interactions.NONE, distance interaction - press [E]
61+
]]
62+
Config.Interactions = AUTO_DETECT
63+
```
64+
By default, the target system is set to **AUTO_DETECT**, which automatically detects the available target system on your server.
65+
- If you want to use **ox_target**, set the value to **Interactions.OX**.
66+
- If you want to use **qb-target**, set the value to **Interactions.QB**.
67+
- If you want to use the distance interaction (press [E]), set the value to **Interactions.NONE**.
68+
69+
### Restart the server
70+
After making changes to the config.lua file, restart your server to apply the new target system settings.
71+
</Steps>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: it-scripts - How to execute commands
3+
description: This guide will help you execute commands on your FiveM Server.
4+
---
5+
6+
7+
import { Steps } from 'nextra/components'
8+
9+
# How to execute commands
10+
The ExecuteCommand() function lets you run any FiveM command directly from a script.
11+
It’s useful for automating tasks or triggering commands programmatically.
12+
13+
## How It Works
14+
Simply call the function with the command you want to execute as a string:
15+
16+
<Steps>
17+
### Run a Chat Command
18+
This sends "Hello, world!" to the chat.
19+
```lua
20+
ExecuteCommand("say Hello, world!")
21+
```
22+
### Trigger a Custom Command
23+
This runs a custom /heal command for the player ID 1.
24+
```lua
25+
ExecuteCommand("heal 1")
26+
```
27+
### Create a Shortcut Command
28+
This makes a /healMe command that heals the player who runs it.
29+
```lua
30+
RegisterCommand("healMe", function()
31+
ExecuteCommand("heal " .. GetPlayerServerId(PlayerId()))
32+
end, false)
33+
```
34+
That’s it! ExecuteCommand is a simple and powerful way to run commands directly from your scripts.
35+
36+
</Steps>
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
title: it-scripts - How to set webhook system
3+
description: This article explains how to set up webhooks for your server and how to configure them for different actions.
4+
---
5+
6+
import { Steps, Tabs } from 'nextra/components'
7+
import YouTube from '@components/YouTube'
8+
9+
# How to set webhook system
10+
## Webhook System
11+
Webhooks are an essential feature for many it-scripts assets, enabling seamless communication between your server and Discord.
12+
They are primarily used to send logs, updates, and other useful information to specific channels in your Discord server.
13+
14+
## Fivemanager Integration
15+
**Comming Soon** *(Currently there is no script from us that uses Fivmanager)*
16+
17+
## Discord Webhooks
18+
Discord webhooks are ideal for logging information, such as:
19+
<Steps>
20+
### Player Logs
21+
- Track player actions, such as joining or leaving the server.
22+
- Monitor player interactions with specific assets or features.
23+
24+
### Custom Notifications
25+
- Send custom messages or alerts to your Discord server.
26+
- Notify users about important events or updates.
27+
</Steps>
28+
29+
## How to set up webhooks
30+
<Steps>
31+
### Create a Discord Webhook
32+
<YouTube id="fKksxz2Gdnc" />
33+
34+
### Locate the Webhook Configuration
35+
- To make ours scripts more secure the webhook system is located in a sperate file that is only loaded on the server.
36+
- The file is located in `server/sv_webhooks.lua`.
37+
- This file contains the configuration settings for the webhook system.
38+
39+
### Configure the Webhook
40+
- Open the `sv_webhooks.lua` file in a text editor.
41+
- Find the following configuration section:
42+
<Tabs items={['One webhook', 'Multiple webhooks']}>
43+
<Tabs.Tab>
44+
```lua
45+
local webhookSettings = {
46+
['active'] = false, -- Set to true to enable the webhook
47+
['name'] = 'it_referral', -- Name for the webhook
48+
['avatar'] = 'https://i.imgur.com/mbM87BJ.png', -- Avatar for the webhook
49+
['url'] = 'YOUR_WEBHOOK_URL', -- Webhook URL
50+
}
51+
```
52+
If you want to activate the webhook system, set the `active` attribute to `true`.
53+
- Replace `YOUR_WEBHOOK_URL` with the actual webhook URL you created in Discord.
54+
- You can also customize the `name` and `avatar` attributes to personalize the webhook.
55+
</Tabs.Tab>
56+
<Tabs.Tab>
57+
```lua
58+
local webhookSettings = {
59+
['active'] = false, -- Set to true to enable the webhook
60+
['name'] = 'it-drugs', -- Name for the webhook
61+
['avatar'] = 'https://i.imgur.com/KvZZn88.png', -- Avatar for the webhook
62+
['urls'] = {
63+
['plant'] = 'https://discord.com/api/webhooks/**************/*************************', -- Webhook URL for plant actions
64+
['table'] = nil, --'', -- Webhook URL for table actions
65+
['sell'] = nil, --'', -- Webhook URL for sell actions
66+
['message'] = nil, --'', -- Webhook URL for messages
67+
}
68+
}
69+
```
70+
If you want to activate the webhook system, set the `active` attribute to `true`.
71+
Now you can set multiple webhooks for different actions.
72+
- Replace `nil` with the actual webhook URL you created in Discord. Example:
73+
```lua
74+
['plant'] = 'https://discord.com/api/webhooks/**************/*************************', -- Webhook URL for plant actions
75+
```
76+
- You can also customize the `name` and `avatar` attributes to personalize the webhook.
77+
</Tabs.Tab>
78+
</Tabs>
79+
### Save and Restart
80+
- Save the changes to the `sv_webhooks.lua` file.
81+
- Restart the script or the server to apply the changes.
82+
- The webhook system is now active and will send logs to the specified Discord channel.
83+
</Steps>

0 commit comments

Comments
 (0)