Xovos / esx_illegal

I changed ESX_Drugs and added a lot of features like more drugs and licenses for the money was and the money wash itself.
GNU General Public License v3.0
16 stars 16 forks source link

Drugs under map #37

Closed dankilsbyyy closed 3 years ago

dankilsbyyy commented 3 years ago

Before changing any locations all plants appear fine. However when the locations are changed weed plant, coke plants and heroin plants move to the new coords but under the map (changing z coords doesn't move them at all ). Chemicals and the other drugs in barrels appear fine after moving.

Xovos commented 3 years ago

Hi

it has been a long time since i've worked on this project but it i remember correctly then i define a range of z coordinates in which the plants/barrels can spawn becaus land is never flat. I see now that this is not linked to the config so if you want to change the spawn range for plants or barels you will have to go into the client/[drug].lua file and edit the local groundCheckHeights in the GetCoordZ[Drug](x, y) function.

function GetCoordZCoke(x, y) local groundCheckHeights = { 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0 } for i, height in ipairs(groundCheckHeights) do local foundGround, z = GetGroundZFor_3dCoord(x, y, height) if foundGround then return z end end return 77 end

Xovos

dankilsbyyy commented 3 years ago

Just tested and that's fixed the issue. Thanks so much for the quick reply and fix!