Closed dankilsbyyy closed 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 endXovos
Just tested and that's fixed the issue. Thanks so much for the quick reply and fix!
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.