Setting Up Locations
My scripts come with a generally unified way of creating locations for target zones
The basics of this is: Location File > Create Target Event > Tanslate to qb-target or ox_target
It is very easy to add new locations in files simply by copy and pasting another and editing it through that
Explanation of a target in a location file:
Example:
Shop = {
{ coords = vec4(1171.75, 2635.96, 37.38, 315.0), width = 0.6, depth = 0.6, minZ = 36.93, maxZ = 38.33,
label = "Shop", icon = "fas fa-box-open",
},
},
This is a shop target, we're only going to focus on the coords here
When creating a new zone, there NEEDS to be model/prop inside it for you to target
Coords
This is the "center" of the location, in the game world where the target zone will be created
This is a vector4()
This consists of 4 vector variables - X Y Z and Heading
coords = vec4(1171.75, 2635.96, 37.38, 315.0)
Width
This is the width in GTA unit's, how wide the target box zone will be when created
width = 0.6,
Depth
This is how "deep" in GTA units the target box will be when created
depth = 0.6,
minZ
This is optional, if this is removed or not added, it will automatically create a number based on the z coord
This is where, in the game world, the BOTTOM of the target box zone should be
This needs to be below the Z coord, in this example it is:
minZ = 36.93,
This is 0.45
BELOW the Z coordinate of 37.38
maxZ
This is optional, if this is removed or not added, it will automatically create a number based on the z coord
This is where, in the game world, the TOP of the target box zone should be
This needs to be above the Z coord, in this example it is:
maxZ = 38.33,
This is 0.95
ABOVE the Z coordinate of 37.38
The easiest way to create a new zone is to use PolyZone, the script that controls the creation of these zones
Zone location
Type /pzcreate poly
to start creating a PolyZone
Pick a name, this doesn't matter as you can set this later in locations.lua
You will then get a red line right where you are standing.
Use your ARROW keys to move this around to the first corner/point you want to place.
When its in the correct place, type /pzadd
and this will lock the current point and allow you to create another Repeat this until your last corner/point where you will type /pzfinish
.
This will save all the vectors of the points you have chosen and place them in a file called: polyzone_created_zones.txt
In this file is the vectors that you need to copy over to my scripts.
Target Locatons
--
Last updated