qbcore-framework / qb-apartments Goto Github PK
View Code? Open in Web Editor NEWApartment Script Used With QB-Core :house:
License: GNU General Public License v3.0
Apartment Script Used With QB-Core :house:
License: GNU General Public License v3.0
Describe the bug
when you go into your apartment and use stash or outfits, it shows up but nothing happens when you press E.
(I will try change apartment's, when I wake up. see if that helps. after thinking about it.)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Questions (please complete the following information):
qb-
to something custom? [e.g. yes/no]Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Describe the feature you'd like
A The ability for police to enter anyones apartment using there citizen id, this would be a good feature as it'll allow police to enter apartments for raids without the person being raided having any knowledge of it
Describe alternatives you've considered
A Trying to implement it myself but currently struggling
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
No.
Describe the feature you'd like
I was thinking of a System that Police Officers can force Playerapartments into a "lockdown" state, where players cant enter it anymore but all Police officers can
Describe alternatives you've considered
None came to my mind.
Additional context
Dunno if its okay to also write this here, but it would be awesome if the Police MDT Phone app also showed the owned house when the player actually has one.
even the command Char in qb-multichar is crashing me.. Any reason for that?
Describe the bug
If i logout inside the apartments, then when we log back inn, we 9/10 times go into the wrong routing bucket when leaving for the outside, resulting that the player cant se anybody else on the server.
When I logout inside of my apartment, and then log back in and choose a location other than last location, when I return to my apartment I cannot access the menu to go back inside. It thinks I'm still inside my apartment. Not only that but when I'm bugged and the game thinks I'm inside my apartment I'm in a completely different world than everyone else where they can't see or hear me.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Menu re-appears and let's me go inside, doesn't make invisible.
qb-
to something custom? no.Updated with all the lastest and it does not have the Text to go in into the apartment
Questions (please complete the following information):
Describe the bug
A clear and concise description of what the bug is. A stranger to qbcore should be able to read your bug report and understand how to reproduce it themselves and understand how the feature should work normally.
To Reproduce
Steps to reproduce the behavior:
Questions (please complete the following information):
qb-
to something custom? [no]When I edit in config.lua Apartments.Starting to false and want to move in a appartement it wont be written in the database.
Is your feature request related to a problem? Please describe.
No, This feature request has been asked before but has not been answered or responded though those issue tickets have been closed since.
Describe the feature you'd like
It'd be nice to be able to bill players a set amount per hour or day for their apartment but of course the price changing depending on location or value of the apartments.
For example, they pay 100$ an hour for renting the apartment, South Rockford Drive, though if they were to move to Tinsel Towers, rent would cost 250$ an hour or whatever amount the server owner wants to make that charge to be.
The code would be simple and may look from this
["apartment1"] = {
name = "apartment1",
label = "South Rockford Drive",
coords = {
enter = vector4(-667.02, -1105.24, 14.63, 242.32),
},
To something like this
["apartment1"] = {
name = "apartment1",
label = "South Rockford Drive",
rent = 100,
coords = {
enter = vector4(-667.02, -1105.24, 14.63, 242.32),
},
On top of that, it would be that it would go off with the paycheck timer set in qb-core
QBConfig.Money.PayCheckTimeOut = 15 -- The time in minutes that it will give the paycheck
or a new line be added which allows for the time to be different on payment of apartments like
QBConfig.Money.BillApartment = 60 -- The time in minutes that a bill will be sent for renting the apartment they selected
If not, you could create a new line in qb-apartments which would be something along the lines of:
Apartments.BillTimer = 60 -- The time in minutes that a bill will be sent for renting the apartment they selected
Describe alternatives you've considered
Well I gave 2 solutions above though a complete alternative could be that all apartments cost the same and you have 2 new added lines in the config
Which the lines would look something like this:
Apartments.BillCost = 250 -- The amount that should be billed for the apartment rent when the timer below runs out Apartments.BillTimer = 60 -- The time in minutes that a bill will be sent for renting the apartment they are living in
Additional context
I would maybe like to see that if the rent doesn't get paid due to a negative balance, does it allow for the money to be still drawn making the player be in the negatives and if set as false for allowing a negative balance, does this mean the payment fails and the player becomes homeless.
For example, I would put that type of option in the apartments config.lua and the lines would look something like this:
Apartments.BillTimer = 60 -- The time in minutes that a bill will be sent for renting the apartment they are living in Apartments.BillNegative = false -- true/false - Allow a negative figure when charging the player for rent Apartments.BillHomeless = true -- true/false - If a negative payment set false, does the player become homeless?
If you require more information or would like me to give more suggestions on this then please let me know.
-- NOTE: I could possibly code this myself though I would take some time to implement and ensure it works properly (I don't have time right now to do it either).
~~Edited to correct some mistakes in the code and some spelling mistakes.
Describe the bug
I have noticed on my server when my group get done with heist and we all try to enter our own apartments to store the goods we got. that if we all in the same moment click to enter our apartments that sometimes they will spawn in my apartment instead of their own apartment.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
i expect for everyone to enter their own apartment
Screenshots
If applicable, add screenshots to help explain your problem.
Questions (please complete the following information):
qb-
to something custom? nope i didnt rename anythingDescribe the bug
When attempting to enter my apartment or buy or move into a new one the menu is unusable, it doesn't show my cursor and arrow keys etc do nothing
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I mean I expected to be able to actually use the menu to access the apartments
Screenshots
(https://cdn.discordapp.com/attachments/446201646687584257/912999539370246154/unknown.png)
Questions (please complete the following information):
qb-
to something custom? [e.g. yes/no]Additional context
Add any other context about the problem here.
I couldn't even leave my starting apartment after creating my character and none of the interactions in the apartment worked
Describe the bug
The new polyzones make it so that when creating a new character you get the popup to exit the apartment while inside the character customization.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
This should not happen during character creation
Screenshots
Is your feature request related to a problem? Please describe.
Should be a config for stash size, seems like a no brainer :)
Describe the feature you'd like
Bascially this table thingo that Lionheart referred to: https://discord.com/channels/831626422232678481/977648270031605811/977710882543009873
Describe alternatives you've considered
Manually adding
lua TriggerServerEvent("inventory:server:OpenInventory", "stash", "StashName", { maxweight = 1500000, slots = 50, })
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
Adding routing buckets so we dont need to share apartments when you have a decent playerbase.
If you logout in the appartments with the logout off character or just exit in appartments interior when you relog back in you get teleported back to the appartment but the problem is you don't get no more like leave the apartments or stash or anything you're just stuck in the appartments
Describe the bug
Whenever I set Apartments.Starting to False a few things are happening. First, you don't get a ped menu, so you cannot pick your outfit and it will give you a random default ped. Second, if you try to move in to the apartment, you will not be able to enter it. There are no errors, and other people have had similar issues, none of them have been resolved.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The setting to not break the script?
Screenshots
Questions (please complete the following information):
qb-
to something custom? noAdditional context
Add any other context about the problem here.
Describe the bug
The problem is with the following points
When two players meet
One is inside the apartment and the other is outside and rings the bell
And he didn't reply
The person outside goes to steal a grocery store, for example, and when the police arrive
He asks a friend to accept the ringing of the bell
The player disappears from the place where he is, for example the grocery store
He enters the apartment
Sometimes the log cannot review this
The bell should be killed after, for example, one minute(
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Questions (please complete the following information):
qb-
to something custom? [e.g. no]Additional context
Add any other context about the problem here.
Multiple entrance vectors for the same apartment for cases where by there is a lobby with multiple lifts.
Describe the bug
When Apartments.Starting = false then no clothing menu coming on 1st character creations
To Reproduce
Expected behavior
it should appear clothing menu without that too it was a feature
Questions (please complete the following information):
qb-
to something custom? [no]Kindly a hot fix or temp solution for the issue
It is very nice to have an hourly rent for the apartment
And the rent is deducted with each hour of presence
And that the storage space of the apartments is linked to each player of a certain weight
We can then create a script
Inside the city center to buy weights
To increase the weight of the apartment stash
Apartment system should be developed
We will work on this
The problem with redeveloping this thing is
The value of the stash is 1000
But I searched all the code, how do I know where it gets the value from, I didn't know
For example, there are some things missing in this code
How can the police search the apartment
Meaning that there is a criminal who has a set of illegal purposes
How can the police search the apartment can not
2.For example, all stores cannot be customized
Meaning I want to increase the value of a specific player's stasg from 1000 to 2000
This can't
This script is rudimentary, we should do a good re-specialization
The rental system is very useful and wonderful
Describe the bug
Every time i set the Apartment.Starting to false the players are not able to use the apartments at all, the blips to show where they are disappeared, when you go to the to the vector- it shows the menu, you click "Move Here" and it doesnt let players go inside.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Questions (please complete the following information):
qb-
to something custom? [no]Additional context
Add any other context about the problem here.
Describe the bug
Whenever someone creates a new character and choose their apartment, they are greeted with an infinite black screen. It then pops up the UI of the apartment and they have to disconnect, load back in and then they have a default skin without the ability to change their clothes.
Steps to reproduce the behavior
Expected behavior
When you select the desired apartment you are to spawn in at the apartment and then the clothing menu should pop-up to change your characters clothes.
Questions (please complete the following information)
When you last updated: 1 day ago
Are you using custom resource? which ones? illenium-appearance (edit of fivem-appearance) to replace qb-clothing, qb-spawn / qb-apartments and qb-spawn edit by marcostom32
Have you renamed qb- to something custom? No
Additional context
My oxmysql has been updated to the latest version.
In qb-multicharacter i replaced 2 events.
qb-multicharacter:server:getSkin has been edited with
QBCore.Functions.CreateCallback("qb-multicharacter:server:getSkin", function(_, cb, cid)
local result = MySQL.query.await('SELECT * FROM playerskins WHERE citizenid = ? AND active = ?', {cid, 1})
if result[1] ~= nil then
cb(json.decode(result[1].skin))
else
cb(nil)
end
end)
and
RegisterNUICallback('cDataPed', function(nData, cb) has been edited with
RegisterNUICallback('cDataPed', function(nData, cb)
local cData = nData.cData
SetEntityAsMissionEntity(charPed, true, true)
DeleteEntity(charPed)
if cData ~= nil then
QBCore.Functions.TriggerCallback('qb-multicharacter:server:getSkin', function(skinData)
if skinData then
local model = skinData.model
CreateThread(function()
RequestModel(GetHashKey(model))
while not HasModelLoaded(GetHashKey(model)) do
Wait(10)
end
charPed = CreatePed(2, model, Config.PedCoords.x, Config.PedCoords.y, Config.PedCoords.z - 0.98, Config.PedCoords.w, false, true)
local RandomAnims = {
"WORLD_HUMAN_HANG_OUT_STREET",
"WORLD HUMAN STAND IMPATIENT",
"WORLD_HUMAN_STAND_MOBILE",
"WORLD_HUMAN_SMOKING_POT",
"WORLD_HUMAN_LEANING",
"WORLD_HUMAN_DRUG DEALER_HARD",
"WORLD_HUMAN_SUPERHERO",
"WORLD_HUMAN_TOURIST_MAP",
"WORLD_HUMAN YOGA",
"WORLD_HUMAN_BINOCULARS",
"WORLD HUMAN BUM WASH",
"WORLD_HUMAN_CONST_DRILL",
"WORLD_HUMAN_MOBILE_FILM_SHOCKING",
"WORLD HUMAN MUSCLE FLEX",
"WORLD_HUMAN_MUSICIAN",
"WORLD_HUMAN_PAPARAZZI",
"WORLD_HUMAN_PARTYING",
}
local PlayAnim = RandomAnims[math.random(#RandomAnims)]
SetPedCanPlayAmbientAnims(charPed, true)
TaskStartScenarioInPlace(charPed, PlayAnim, 0, true)
SetPedComponentVariation(charPed, 0, 0, 0, 2)
FreezeEntityPosition(charPed, false)
SetEntityInvincible(charPed, true)
PlaceObjectOnGroundProperly(charPed)
SetBlockingOfNonTemporaryEvents(charPed, true)
exports['illenium-appearance']:setPedAppearance(charPed, skinData)
end)
else
CreateThread(function()
local randommodels = {
"mp_m_freemode_01",
"mp_f_freemode_01",
}
local model = GetHashKey(randommodels[math.random(1, #randommodels)])
RequestModel(model)
while not HasModelLoaded(model) do
Wait(0)
end
charPed = CreatePed(2, model, Config.PedCoords.x, Config.PedCoords.y, Config.PedCoords.z - 0.98, Config.PedCoords.w, false, true)
SetPedComponentVariation(charPed, 0, 0, 0, 2)
FreezeEntityPosition(charPed, false)
SetEntityInvincible(charPed, true)
PlaceObjectOnGroundProperly(charPed)
SetBlockingOfNonTemporaryEvents(charPed, true)
end)
end
cb("ok")
end, cData.citizenid)
else
CreateThread(function()
local randommodels = {
"mp_m_freemode_01",
"mp_f_freemode_01",
}
local model = GetHashKey(randommodels[math.random(1, #randommodels)])
RequestModel(model)
while not HasModelLoaded(model) do
Wait(0)
end
charPed = CreatePed(2, model, Config.PedCoords.x, Config.PedCoords.y, Config.PedCoords.z - 0.98, Config.PedCoords.w, false, true)
SetPedComponentVariation(charPed, 0, 0, 0, 2)
FreezeEntityPosition(charPed, false)
SetEntityInvincible(charPed, true)
PlaceObjectOnGroundProperly(charPed)
SetBlockingOfNonTemporaryEvents(charPed, true)
end)
cb("ok")
end
end)
Removed qb-clothing from the dependencies section of fxmanifest.lua in qb-houses and qb-apartments
Imported 2 SQL files
CREATE TABLE IF NOT EXISTS playerskins
(
id
int(11) NOT NULL AUTO_INCREMENT,
citizenid
varchar(255) NOT NULL,
model
varchar(255) NOT NULL,
skin
text NOT NULL,
active
tinyint(4) NOT NULL DEFAULT 1,
PRIMARY KEY (id
),
KEY citizenid
(citizenid
),
KEY active
(active
)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS player_outfits
(
id
int(11) NOT NULL AUTO_INCREMENT,
citizenid
varchar(50) DEFAULT NULL,
outfitname
varchar(50) NOT NULL DEFAULT '0',
model
varchar(50) DEFAULT NULL,
props
varchar(1000) DEFAULT NULL,
components
varchar(1500) DEFAULT NULL,
PRIMARY KEY (id
),
UNIQUE KEY citizenid_outfitname_model
(citizenid
,outfitname
,model
),
KEY citizenid
(citizenid
)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4;
Describe the bug
When loading into an apartment, the necessary PolyZone's aren't populated, resulting in the inability to exit the apartment.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Menus to appear while inside of zone to leave apartment.
Questions (please complete the following information):
qb-
to something custom? noI have some player going outside the classic appartments and when they enter the car it goes crazy and fly until it goes off the car. Only fix is not to enter classic apartments and restart fivem ... Impossible to fix the issue for now and don't understand how it's possible also.
Not happening every time it's totaly randomly
Describe the bug
Background:
Player A Character 1 (PAC1) - Roaming around the city
Player A Character 2 (PAC2) - Saved their last location outside of their apartment somewhere
Issue:
If (PAC1) heads to their apartment and logs out ONLY to select a different character, (PAC2) can not enter any apartment at all. The only workaround for this is to F8 and quit, then rejoining the server to select (PAC2).
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The desired outcome should allow a player to log off to select a different character and then allowing that second character to enter their apartment or change apartment if wanted.
Questions (please complete the following information):
When you last updated: [e.g. last week]
Last week
Are you using custom resource? which ones? [e.g. zdiscord, qb-target]
No
Have you renamed qb-
to something custom? [e.g. yes/no]
No
Additional context
Interesting find
when i spawn in my apartment and walk too the door the menu too get out wont show up,but when i was walkin around too see if the go out menu would appear somewhere else i found it behind the sofa....how can i fix this??
Describe the bug
After creating character and choose apartments, No text appears (Stash, log out, Leave apartments etc..) We have to reboot server for the text to appear
To Reproduce
Steps to reproduce the behavior:
Questions (please complete the following information):
qb-
to something custom? noDescribe the bug
When you spawn and select the apartment you can't get out of it.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To be able to get out of the apartment
Questions (please complete the following information):
qb-
to something custom?: noDescribe the bug
I have very interesting bug on my fresh install qb-apartments. When someone put something in their stash. After a while this thing disappears and you can't open again the stash it's saying STASH-NONE/
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Questions (please complete the following information):
qb-
to something custom? NoAdditional context
Add any other context about the problem here.
It would be very great if you guys the add the qb-target to it
There are two bugs I can mention.
1: It is not possible to ring the bell at someone else's apartment.
2: You cannot enter at Integrity Way.
Need little MS optimization before it was 0.02 on a average PC but now its touching constant 0.04 ms no matter where i am but it should to be am close to my apartments
Describe the bug
You will see many users timing out at random.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When some users are ingame, they may see a timeout for the screenshot below.
Screenshots
If applicable, add screenshots to help explain your problem.
You can fix this by making changes and checks to SetClosestApartment function client side, as it is being referenced too often causing the crash.
in particular,
QBCore.Functions.TriggerCallback('apartments:IsOwner', function(result) IsOwned = result DeleteApartmentsEntranceTargets() DeleteInApartmentTargets() end, ClosestHouse)
Describe the bug
Drawtext only shows for 1second then goes away while in Polyzone for stash etc
To Reproduce
Steps to reproduce the behavior:
Expected behavior
For it to stay on screen when in the Polyzone
Questions (please complete the following information):
qb-
to something custom? [e.g. yes/no] noDescribe the bug
The following happens when Apartments.Starting = false. Non owned apartments wont even show on the map until you own an apartment, so players have no clue where the apartments are. When going to an apartment, into the menu, pressing "Move here", it will tell you that you have moved to the apartment and you will see it on the map. But, the apartment isn't saved to the database, and you can't go inside of it.
To Reproduce
Steps to reproduce the behavior:\
Expected behavior
You should be able to see all unowned apartments on the map whether you already own one or not. Your apartment should be enterable & added to the database when moving to it.
Questions (please complete the following information):
qb-
to something custom? NoDescribe the bug
A clear and concise description of what the bug is. A stranger to qbcore should be able to read your bug report and understand how to reproduce it themselves and understand how the feature should work normally.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
players staying invisible for each other
Questions (please complete the following information):
qb-
to something custom? noDescribe the bug
So I logging in to my character everything is good, but then when I decide to log out inside the apartment option to change character, but I change to the same one and spawn inside the apartment using the option apartment spawn. I did not do it. It gave me a error
It is very nice to have an hourly rent for the apartment
And the rent is deducted with each hour of presence
And that the storage space of the apartments is linked to each player of a certain weight
We can then create a script
Inside the city center to buy weights
To increase the weight of the apartment stash
Apartment system should be developed
We will work on this
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.