|
| 1 | +--- |
| 2 | +title: it_bridge - How to test? |
| 3 | +description: Welcome to the it_bridge test guide, here you can learn how to completely test our asset, following each step we will achieve a clean and fluid test where you will not find any problems, as long as the documentation has been completed in full. |
| 4 | +--- |
| 5 | + |
| 6 | +import { Callout } from '@components/Callout' |
| 7 | +import { Steps } from 'nextra/components' |
| 8 | + |
| 9 | +# How to test? |
| 10 | +Welcome to the **it_bridge** test guide, where you can learn how to completely test the our asset on your server, following each step we will achieve a clean and fluid test where you will find any problems with the bridge on your server, as long as the documentation has been completed. |
| 11 | + |
| 12 | +<Callout type="warning"> |
| 13 | + Before you start testing the script, make sure that you have followed the installation guide and that the script is correctly installed on your server. |
| 14 | +</Callout> |
| 15 | + |
| 16 | +<Steps> |
| 17 | +### Configuration of the script |
| 18 | +First you have to configure the **it_bridge** script, you can do this in the `config.lua` file. |
| 19 | +On most servers you can leave the default settings, but if you want to change something you can do this. |
| 20 | + |
| 21 | +### Start the it_bridge script |
| 22 | +After you have configured the script, you can start the script on your server. |
| 23 | +If you followed the install guide correctly, the script should start aumaotically when you start your server. |
| 24 | +If the script does not start automatically, you can start it manually with the following command in your txAdmin Console: |
| 25 | +```lua |
| 26 | +start it_bridge |
| 27 | +``` |
| 28 | + |
| 29 | +After starting the script, you should see a message in your server console after a few seconds, that the script has started successfully. |
| 30 | +The script will also tell you which settings are currently active. Please make sure these settings are correct. |
| 31 | + |
| 32 | +**Example Message:** |
| 33 | +[](https:/i.imgur.com/gyQOv2X.png "Open Image") |
| 34 | + |
| 35 | +### Start the bridge_tester script |
| 36 | +After you started the **it_bridge** script, you can start the **bridge_tester** script. |
| 37 | +This script is used to test the **it_bridge** script and to make sure that everything is working correctly. |
| 38 | +You can start the **bridge_tester** script with the following command in your txAdmin console: |
| 39 | +```lua |
| 40 | +start bridge_tester |
| 41 | +``` |
| 42 | + |
| 43 | +### Test the script |
| 44 | +After you have started the **bridge_tester** script, you can test the **it_bridge** script. |
| 45 | + |
| 46 | +<Steps> |
| 47 | +#### 1. Test your Framework |
| 48 | +To test if the it_brige script is working correctly, with your framework, you can use the following command in your txAdmin console: |
| 49 | +```lua |
| 50 | +bridgeTestFramework id money bank blackMoney |
| 51 | +``` |
| 52 | +- **id**: The player ID you want to test the script with. |
| 53 | +- **money**: The amount of money (cash) the player currently has. |
| 54 | +- **bank**: The amount of money the player currently has in the bank. |
| 55 | +- **blackMoney**: The amount of black money the player currently has. |
| 56 | + |
| 57 | +<Callout type="info"> |
| 58 | + If you are using **qb-core**, **qBox** as your framework set the amount for **blackMoney** to the amount of crypto the player has. |
| 59 | + If you are using **ND_Core** set the amount for **blackMoney** to 0. |
| 60 | +</Callout> |
| 61 | + |
| 62 | +After you issued the command, you should see some messages in your server console, |
| 63 | +the script will automatically test the **it_bridge** script with the given values. |
| 64 | + |
| 65 | +The script will print the result of every test in the server console. |
| 66 | +If you encounter any errors, please report them in the [Discord](https://discord.it-scripts.com). |
| 67 | + |
| 68 | +##### Example input |
| 69 | +```lua |
| 70 | +bridgeTestFramework 1 1000 500 0 |
| 71 | +``` |
| 72 | + |
| 73 | +##### Example output |
| 74 | +[](https:/i.imgur.com/X4SPCCK.png "Open Image") |
| 75 | + |
| 76 | +#### 2. Test your Inventory Script |
| 77 | +To test if the **it_bridge** script is working correctly with your inventory script, you can use the following command in your txAdmin console: |
| 78 | +```lua |
| 79 | +bridgeTestInventory id item |
| 80 | +``` |
| 81 | + |
| 82 | +- **id**: The player ID you want to test the script with. |
| 83 | +- **item**: The item you want to test the script with. |
| 84 | + |
| 85 | +<Callout type="info"> |
| 86 | + For the item parameter, you can use any item that is in your inventory **except** for the money items. |
| 87 | +</Callout> |
| 88 | + |
| 89 | +After you issued the command, you should see some messages in your server console, |
| 90 | +the script will automatically test the **it_bridge** script with the given values. |
| 91 | + |
| 92 | +The script will print the result of every test in the server console. |
| 93 | +If you encounter any errors, please report them in the [Discord](https://discord.it-scripts.com). |
| 94 | + |
| 95 | +##### Example input |
| 96 | +```lua |
| 97 | +bridgeTestInventory 1 bread |
| 98 | +``` |
| 99 | + |
| 100 | +##### Example output |
| 101 | +[](https:/i.imgur.com/OIiB92j.png "Open Image") |
| 102 | +#### 3. Test your Notification Script |
| 103 | +To test if the **it_bridge** script is working correctly with your notification script, you can use the following command in your txAdmin console: |
| 104 | +```lua |
| 105 | +bridgeTestNotify id |
| 106 | +``` |
| 107 | +- **id**: The player ID you want to test the script with. |
| 108 | + |
| 109 | +After you issued the command, the targeted player should receive 4 notifications (every notification type for 5 Seconds) on the screen. |
| 110 | + |
| 111 | +If the player does not receive the notifications, please report this in the [Discord](https://discord.it-scripts.com). |
| 112 | + |
| 113 | +##### Example input |
| 114 | +```lua |
| 115 | +bridgeTestNotify 1 |
| 116 | +``` |
| 117 | + |
| 118 | +#### 4. Test your TextUI Script |
| 119 | +To test if the **it_bridge** script is working correctly with your TextUI script, you can use the following command in your txAdmin console: |
| 120 | +```lua |
| 121 | +bridgeTestTextUI id |
| 122 | +``` |
| 123 | +- **id**: The player ID you want to test the script with. |
| 124 | + |
| 125 | +After you issued the command, the targeted player should receive a TextUI on the screen. On some TextUI scripts, you will recive TextUIs with a different design and on others you will recive a TextUI with the default design. |
| 126 | +This is normal and should not be a problem. |
| 127 | + |
| 128 | +If the player does not receive the TextUI, please report this in the [Discord](https://discord.it-scripts.com). |
| 129 | + |
| 130 | +##### Example input |
| 131 | +```lua |
| 132 | +bridgeTestTextUI 1 |
| 133 | +``` |
| 134 | + |
| 135 | +#### 5. Test your Menu Script |
| 136 | + |
| 137 | +<Callout type="warning"> |
| 138 | + Before testing the Menu, please make sure you have tested the Notification script. |
| 139 | +</Callout> |
| 140 | + |
| 141 | +To test if the **it_bridge** script is working correctly with your Menu script, you can use the following command in your txAdmin console: |
| 142 | +```lua |
| 143 | +bridgeTestMenu id |
| 144 | +``` |
| 145 | +- **id**: The player ID you want to test the script with. |
| 146 | + |
| 147 | +After you issued the command, the targeted player should receive a Menu on the screen. If you press any button on the menu, the script will show a notification. |
| 148 | + |
| 149 | +If the player does not receive the Menu, please report this in the [Discord](https://discord.it-scripts.com). |
| 150 | + |
| 151 | + |
| 152 | +#### 6. Test your Target Script |
| 153 | + |
| 154 | +<Callout type="info"> |
| 155 | + To test your Target script, you need more than one command to test it, because you have to test every target type separately. |
| 156 | +</Callout> |
| 157 | + |
| 158 | +To test if the **it_bridge** script is working correctly with your Target script, you can use the following commands in your txAdmin console: |
| 159 | + |
| 160 | +```lua |
| 161 | +bridgeBoxZone id |
| 162 | +``` |
| 163 | +- **id**: The player ID you want to test the script with. |
| 164 | + |
| 165 | +After you issued the command, in front of the targeted player should appear a prop with a box zone around. If the player tries to target the zone there should be two options. |
| 166 | +The prop and the box zone should disappear after 15 seconds. |
| 167 | + |
| 168 | +```lua |
| 169 | +bridgeTargetEntity id |
| 170 | +``` |
| 171 | +- **id**: The player ID you want to test the script with. |
| 172 | + |
| 173 | +After you issued the command, in front of the targeted player should appear a prop. If the player tries to target the entity there should be two options. |
| 174 | +The prop should disappear after 15 seconds. |
| 175 | + |
| 176 | +```lua |
| 177 | +bridgeGlobalPedTest id |
| 178 | +``` |
| 179 | +- **id**: The player ID you want to test the script with. |
| 180 | + |
| 181 | +After you issued the command, the targeted player should have two target options on every ped in the server. **The script will not spawn a ped!** |
| 182 | +After 15 seconds the target options should disappear. |
| 183 | + |
| 184 | +```lua |
| 185 | +bridgeGlobalVehicle id |
| 186 | +``` |
| 187 | +- **id**: The player ID you want to test the script with. |
| 188 | + |
| 189 | +After you issued the command, the targeted player should have two target options on every vehicle in the server. **The script will not spawn a vehicle!** |
| 190 | +After 15 seconds the target options should disappear. |
| 191 | + |
| 192 | +```lua |
| 193 | +bridgeGlobalPlayer id |
| 194 | +``` |
| 195 | +- **id**: The player ID you want to test the script with. |
| 196 | + |
| 197 | +<Callout type="warning"> |
| 198 | + To test the globalPlayer command there should be at least one other player in the server. |
| 199 | +</Callout> |
| 200 | + |
| 201 | +After you issued the command, the targeted player should have two target options on every player in the server. |
| 202 | +After 15 seconds the target options should disappear. |
| 203 | + |
| 204 | +```lua |
| 205 | +bridgeModel id |
| 206 | +``` |
| 207 | +- **id**: The player ID you want to test the script with. |
| 208 | + |
| 209 | +After you issued the command, in front of the targeted player should appear a prop. If the player tries to target the prop there should be two options. |
| 210 | +The prop should disappear after 15 seconds. |
| 211 | + |
| 212 | + |
| 213 | +If there any problems with the target script, please report this in the [Discord](https://discord.it-scripts.com). |
| 214 | +</Steps> |
| 215 | + |
| 216 | +### Report your results |
| 217 | +After you have tested the **it_bridge** script, you should report your results in the [Discord](https://discord.it-scripts.com). |
| 218 | +Please report your results regardless of whether there were errors or not, this will help us to improve the script and to fix any errors that may occur. |
| 219 | + |
| 220 | +For reporting, please join the Discord and go to the `📑・tickets` channel and open a `Bridge Results` Ticket. |
| 221 | +In this ticket, please provide the following information: |
| 222 | +- Image of the startup message of the **it_bridge** script. |
| 223 | +- Results of the tests. |
| 224 | + - *If you do not have any errors you can just send a short message like `No errors found!`* |
| 225 | + - **If you have any errors, please provide the error message and a description of what you did before the error occurred. And an image of you txAdmin and F8 Console.** |
| 226 | + |
| 227 | +### Stop the bridge_tester script |
| 228 | +After you have tested the **it_bridge** script, you can stop the **bridge_tester** script with the following command in your txAdmin console: |
| 229 | +```lua |
| 230 | +stop bridge_tester |
| 231 | +``` |
| 232 | +</Steps> |
0 commit comments