Skip to content

Commit 40b1f0b

Browse files
committed
Create easy-zone-creation.mdx
1 parent 27e1605 commit 40b1f0b

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: it-drugs - Easy Zone Creation
3+
description: With the script, it is also possible to create your own consumable drugs directly.
4+
---
5+
6+
import { Callout } from '@components/Callout'
7+
8+
# Easy Zone Creation
9+
<Callout type="info">
10+
This tutorial only works as of version 1.2.4 because ox_lib is now used to create a zone instead of PolyZone.
11+
</Callout>
12+
To create a new zone you now can use the `/zone poly` command from ox_lib.
13+
14+
<Callout type="warning">
15+
Make sure you use `/zone poly` if not you will get the zone in a wrong format at the end and cannot add it to the config.
16+
</Callout>
17+
18+
After you have used the command, the following menu should open:
19+
20+
![creating_zone_menu](/creating_zone_menu.png)
21+
22+
You can now simply walk through the zone in-game and set points yourself.
23+
As soon as you have finished creating the zone, press [ENTER]. The following menu will now open:
24+
25+
![save_zone_menu](/save_zone_menu.png)
26+
27+
Now you can give the zone a name and select the format.
28+
29+
<Callout type="warning">
30+
YOU MUST SELECT ARRAY FOR FORMAT OTHERWISE THE ZONE WILL NOT HAVE THE CORRECT FORMAT AND CANNOT BE INSERTED INTO THE SCRIPT.
31+
</Callout>
32+
33+
Zones will be saved to `ox_lib/created_zones.lua` with your chosen format an will look like this:
34+
```lua
35+
{
36+
name = poly,
37+
points = {
38+
vec(447.9, -998.8, 25.8),
39+
vec(450.3, -998.2, 25.8),
40+
vec(449.9, -995.5, 25.8),
41+
vec(447.2, -995.6, 25.8),
42+
vec(446.3, -997.9, 25.8),
43+
},
44+
thickness = 2,
45+
},
46+
```
47+
You can now simply copy the points and thickness and paste them into the config of it-drugs.

0 commit comments

Comments
 (0)