Comments (4)
Hi BigFudge87
i have solved your problem
if you go in to ps-housing/server/ sv_property.lua
and locate:
function Property:UpdateOwner(data)
local targetSrc = data.targetSrc
local realtorSrc = data.realtorSrc
if not realtorSrc then Debug("No Realtor Src found") return end
if not targetSrc then Debug("No Target Src found") return end
local previousOwner = self.propertyData.owner
local targetPlayer = QBCore.Functions.GetPlayer(tonumber(targetSrc))
local PlayerData = targetPlayer.PlayerData
local bank = PlayerData.money.bank
local citizenid = PlayerData.citizenid
if self.propertyData.owner == citizenid then
Framework[Config.Notify].Notify(targetSrc, "You already own this property", "error")
Framework[Config.Notify].Notify(realtorSrc, "Client already owns this property", "error")
return
end
this code will need to be replaced by this code
function Property:UpdateOwner(data)
local targetSrc = data.targetSrc
local realtorSrc = data.realtorSrc
if not realtorSrc then
Debug("No Realtor Src found")
return
end
if not targetSrc then
Debug("No Target Src found")
return
end
local targetPlayer = QBCore.Functions.GetPlayer(tonumber(targetSrc))
if not targetPlayer then
Debug("Failed to retrieve target player data")
return
end
local PlayerData = targetPlayer.PlayerData
local bank = PlayerData.money.bank
local citizenid = PlayerData.citizenid
if self.propertyData.owner == citizenid then
Framework[Config.Notify].Notify(targetSrc, "You already own this property", "error")
Framework[Config.Notify].Notify(realtorSrc, "Client already owns this property", "error")
return
end
then it should work, just to be shure,
You should not use the citizen id, but the server id like 1 or 55 and not something like this QKH11580
hope it works :)
from ps-housing.
Thank you so much. seems to work like it should now. only thing missing is pictures of the shells. but everything else works :D
from ps-housing.
The shells is beacause the discord alle the images were located on is deleted, if you want to have stock images, you have to make them yourself and put them in the config.lua
from ps-housing.
Hi BigFudge87 i have solved your problem
if you go in to ps-housing/server/ sv_property.lua and locate:
function Property:UpdateOwner(data) local targetSrc = data.targetSrc local realtorSrc = data.realtorSrc if not realtorSrc then Debug("No Realtor Src found") return end if not targetSrc then Debug("No Target Src found") return end local previousOwner = self.propertyData.owner local targetPlayer = QBCore.Functions.GetPlayer(tonumber(targetSrc)) local PlayerData = targetPlayer.PlayerData local bank = PlayerData.money.bank local citizenid = PlayerData.citizenid if self.propertyData.owner == citizenid then Framework[Config.Notify].Notify(targetSrc, "You already own this property", "error") Framework[Config.Notify].Notify(realtorSrc, "Client already owns this property", "error") return end
this code will need to be replaced by this code
function Property:UpdateOwner(data) local targetSrc = data.targetSrc local realtorSrc = data.realtorSrc if not realtorSrc then Debug("No Realtor Src found") return end if not targetSrc then Debug("No Target Src found") return end local targetPlayer = QBCore.Functions.GetPlayer(tonumber(targetSrc)) if not targetPlayer then Debug("Failed to retrieve target player data") return end local PlayerData = targetPlayer.PlayerData local bank = PlayerData.money.bank local citizenid = PlayerData.citizenid if self.propertyData.owner == citizenid then Framework[Config.Notify].Notify(targetSrc, "You already own this property", "error") Framework[Config.Notify].Notify(realtorSrc, "Client already owns this property", "error") return end
then it should work, just to be shure, You should not use the citizen id, but the server id like 1 or 55 and not something like this QKH11580
hope it works :)
Hello,
Please submit a PR for this so we can credit you
from ps-housing.
Related Issues (20)
- qb-multicharacter messed up server list so it hangs on loading screen . HOT 1
- Change / Add confirmation for player ID when giving them a buy menu HOT 2
- Config.SkipSelection no longer work in qb-multicharacter HOT 4
- Stuck on loading screen
- ps-housing Garage
- Images not showing up HOT 2
- Image problem HOT 2
- Furniture does not get deleted properly
- Manage property error HOT 1
- Time desync when exiting house HOT 1
- sql
- BUCKETS not working correctly HOT 1
- sql error
- Error when leaving house
- Attempt to index nil vale (global 'lib') HOT 4
- Stashes not working HOT 2
- Images Not Working
- cant migrate apartments or houses HOT 1
- Help
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ps-housing.