#Place Weed inside ps-housing (qb-weed only)

72 messages · Page 1 of 1 (latest)

gray badger
#
  1. Go inside ps-housing > cl_property.lua
  2. Place TriggerEvent('qb-weed:client:getHousePlants', self.property_id) under self:LoadFurnitures() ( Line 216)
  3. Place TriggerEvent('qb-weed:client:leaveHouse') under self.propertyData.furnitures = {} (Line 240)
gray badger
#

?

molten hedge
#

10-8

plain ferry
#

thanks

tribal echo
gray badger
#

Looks alright

smoky pilot
strange vortex
abstract kernel
alpine kettleBOT
#

You have been warned in Project Sloth.

User

@abstract kernel

Action

Warn

Reason

THIS ISNT A SUPPORT CHAT

Time of Warn

<t:1698517420>

Moderator

@long sonnet

Warn ID

760

halcyon wagon
#

@hybrid jolt

hybrid jolt
#

HELL YEA

#

ty

halcyon wagon
#

❤️

gray badger
#

The lines could be changed

hybrid jolt
#

A lot of ppl are still using qb-weed and i'm one of them

#

Headache free keke

gray badger
#

I asked that, but they didnt want that so i just kept it a snippet

hybrid jolt
#

Oh?

gray badger
#

Yeah

craggy pendant
#

I suggest scrolling up and removing your comment before you get warned to ...

wicked ore
#

does this work for v2?

gray badger
#

daamn

#

idk 😛

wicked ore
#

trying

wicked ore
reef smelt
#

@gray badger is this fix still current for qb-weed?

gray badger
#

Idk 😂

hybrid jolt
#

Even for MLO's

#

As i still have it

#

If u have an mlo

#

U can grow weird inside the box

gray badger
#

siiick

wicked ore
#

works but you need to put the snippet to multiple lines

hybrid jolt
#

2 times.

stark raven
#

can we use ps weed to grow weed inside the house or it-drugs

gray badger
weary ledge
gray badger
#

just search enterpropterty and leaveproperty and add the lines..

weary ledge
#

Does this work for loaf housing

gray badger
#

u guys using qb right?

gray badger
#

Replace Property:EnterShell() with this one:

function Property:EnterShell()
    self = self
    local isMlo = self.propertyData.shell == 'mlo'
    local isIpl = self.propertyData.apartment and Config.Apartments[self.propertyData.apartment]
    self.shellData = Config.Shells[self.propertyData.shell]

    if not isMlo or isIpl then
        DoScreenFadeOut(250)
        TriggerServerEvent("InteractSound_SV:PlayOnSource", "houses_door_open", 0.25)
        Wait(250)
        
        if isIpl and isIpl.zone then
            self.mloData = {}
            self.mloData.poly = lib.zones.poly({
                points = isIpl.zone,
                thickness = isIpl.thickness,
                debug = Config.DebugMode,
            })
            local coords = isIpl.interior
            self:RegisterDoorZone(coords)
            SetEntityCoordsNoOffset(cache.ped, coords.x, coords.y, coords.z, false, false, true)
        else
            self:CreateShell()
        end
        self:LoadFurnitures()
    end

    TriggerEvent('qb-weed:client:getHousePlants', self.property_id)

    self.inProperty = true
    self:GiveMenus()

    if not isMlo or isIpl then
        DoScreenFadeIn(250)
    end
end```
#

Replace Property:LeaveShell() with this one:

function Property:LeaveShell()
    if not self.inProperty then return end

    local isMlo = self.propertyData.shell == 'mlo'
    local isIpl = self.propertyData.apartment and Config.Apartments[self.propertyData.apartment].interior

    if not isMlo or isIpl then
        DoScreenFadeOut(250)
        TriggerServerEvent("InteractSound_SV:PlayOnSource", "houses_door_open", 0.25)
        Wait(250)

        local coords = self:GetDoorCoords()
        SetEntityCoordsNoOffset(cache.ped, coords.x, coords.y, coords.z, false, false, true)

        self:UnloadFurnitures()
        
        self.propertyData.furnitures = {}
        if not isIpl then
            self.shell:DespawnShell()
            self.shell = nil
        else
            local mloData = self.mloData
            if mloData and mloData.poly then
                mloData.poly:remove()
                self.mloData = nil
            end
        end
    end
    TriggerServerEvent("ps-housing:server:leaveProperty", self.property_id)

    if self.exitTarget then
        Framework[Config.Target].RemoveTargetZone(self.exitTarget)
        self.exitTarget = nil
    end

    TriggerEvent('qb-weed:client:leaveHouse')

    self:RemoveMenus()
    self.doorbellPool = {}
    self.inProperty = false

    if not isMlo or isIpl then
        Wait(250)
        DoScreenFadeIn(250)
    end
end```
#

Replace Property:RegisterMlo() with this one:

function Property:RegisterMlo()
    local data = lib.callback.await("ps-housing:cb:getMainMloDoor", false, self.property_id, 1)
    if not data then return end
    
    local coords = data.objCoords or data.coords or data.doors[1] and data.doors[1].coords or data.doors[1].objCoords
    local zoneData = type(self.propertyData.zone_data) == 'string' and json.decode(self.propertyData.zone_data) or self.propertyData.zone_data
    if not zoneData then return end

    -- we creating point only if mlo is owned by someone
    if self.propertyData.owner then
        self.mloData = {}
        self.mloData.point = lib.points.new({
            coords = vec3(coords.x, coords.y, coords.z),
            distance = 40,
            onEnter = function()
                self:LoadFurnitures()
                TriggerEvent('qb-weed:client:getHousePlants', self.property_id)
            end,
            onExit = function()
                self:UnloadFurnitures()
                TriggerEvent('qb-weed:client:leaveHouse')
                self.propertyData.furnitures = {}
            end
        })
    end

    if self.owner or self.has_access then
    -- this only for who have access or owning the house
        self.mloData = self.mloData or {}
        self.mloData.poly = lib.zones.poly({
            points = convertToVector(zoneData.points),
            thickness = zoneData.thickness + 3,
            debug = Config.DebugMode,
            onEnter = function()
                TriggerServerEvent("ps-housing:server:enterProperty", self.property_id)
            end,
            onExit = function()
                self:LeaveShell()
            end
        })
    end

    return {
        x = coords.x,
        y = coords.y,
        z = coords.z,
        length = 2.0,
        h = 100.0,
        width = 2.0,
    }
end```
#

Replace the code below:

        self.propertyData.garden_data = {
            poly = poly,
            point = lib.points.new({
                coords = vec3(coords[1].x, coords[1].y, coords[1].z),
                distance = 40,
                onEnter = function()
                    self:LoadFurnitures(poly)
                end,
                onExit = function()
                    self:UnloadFurnitures()
                    self.propertyData.furnitures = {}
                end
            })
        }```

with this one:

```lua
        self.propertyData.garden_data = {
            poly = poly,
            point = lib.points.new({
                coords = vec3(coords[1].x, coords[1].y, coords[1].z),
                distance = 40,
                onEnter = function()
                    self:LoadFurnitures(poly)
                    TriggerEvent('qb-weed:client:getHousePlants', self.property_id)
                end,
                onExit = function()
                    self:UnloadFurnitures()
                    TriggerEvent('qb-weed:client:leaveHouse')
                    self.propertyData.furnitures = {}
                end
            })
        }```

@stark raven @weary ledge
#

test it

weary ledge
#

I have ox inventory

#

I will test today

weary ledge
gray badger
#

cl_property

weary ledge
#

on loaf or qb weed

gray badger
#

ps-housing

weary ledge
#

what about loaf housing

gray badger
#

i dont care about loaf

#

u asked for help on a PS-HOUSING release

weary ledge
#

i asked for loaf

gray badger
#

noone cares about loaf

#

why would u ask someone if he got it fixed in a thread for ps-housing

weary ledge
#

okay then u shouldn't of commented i need help with loaf

gray badger
#

if ur using loaf which is paid anyways

#

ur on the wrong discord then

weary ledge
#

okay u aint gotta be a pussy

gray badger
#

bro ur serious?

weary ledge
#

i clearly stated does it work for loaf

gray badger
#

why tf would u ask a user who got problems with PS in a PS Discord if he got it fixed

#

the guy anwsers now

#

AND THEN ur tell us ur using loaf