Skip to content

Update README.md#2

Open
Ashenboy wants to merge 2 commits intolevdevlev:mainfrom
Ashenboy:patch-1
Open

Update README.md#2
Ashenboy wants to merge 2 commits intolevdevlev:mainfrom
Ashenboy:patch-1

Conversation

@Ashenboy
Copy link

fix exit,stash and logout offsets
image
image
image

Ashenboy added 2 commits May 11, 2023 18:13
fix exit,stash and logout offsets
@ybservices23
Copy link

hey, i just downloaded it but was not fixed? using the latest qb core

@ybservices23
Copy link

as in the stash & exit are still in the same position, i did everything you said in the read me

local function CreateShell(spawn, exitXYZH, model)
local objects = {}
local POIOffsets = {}
POIOffsets.exit = exitXYZH
DoScreenFadeOut(500)
while not IsScreenFadedOut() do
Wait(10)
end
RequestModel(model)
while not HasModelLoaded(model) do
Wait(1000)
end
local house = CreateObject(model, spawn.x, spawn.y, spawn.z, false, false, false)

local spawnPointX = 0.089353
local spawnPointY = -2.67699
local spawnPointZ = 0.760894
local spawnPointH = 270.76

FreezeEntityPosition(house, true)
objects[#objects+1] = house
TeleportToInterior(spawn.x + spawnPointX, spawn.y + spawnPointY, spawn.z + spawnPointZ, spawnPointH)

return { objects, POIOffsets }

end

exports('CreateShell', function(spawn, exitXYZH, model)
return CreateShell(spawn, exitXYZH, model)
end)

-- Starting Apartment

exports('CreateApartmentFurnished', function(spawn)

local exit = json.decode('{"x": 0.80353, "y": 1.94699, "z": 0.960894, "h": 270.76}')

local model = "lev_apartment_shell"
local obj = CreateShell(spawn, exit, model)
if obj and obj[2] then
    obj[2].clothes = json.decode('{"x": -7.04442, "y": -2.97699, "z": 0.960894, "h": 181.75}')
    obj[2].stash = json.decode('{"x": -3.04442, "y": 2.17699, "z": 0.960894, "h": 181.75}')
    obj[2].logout = json.decode('{"x": 1.010176, "y": 2.29546, "z": 0.960894, "h": 91.18}')
end
if IsNew then
    SetTimeout(750, function()
        TriggerEvent('qb-clothes:client:CreateFirstCharacter')
        IsNew = false
    end)
end
return { obj[1], obj[2] }

end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants