#ps-mdt qbx_properties
1 messages · Page 1 of 1 (latest)
aint that a database error
yeah found a fix for it
Tqble is properties
What’s the fix?
ill find the snippets for you
What was the fix? I am having the same issue.
it was snippets that i found that fixed the issue and can't find them now when i do ill post here
try searching the ps discord
Did you ever find the snippet for this? Can't find it myself, but not sure if I'm just stupid
**find this line in ps-mdt/dbm.lua function GetPlayerProperties(cid, cb) replace it with **
function GetPlayerProperties(cid, cb)
local result = MySQL.query.await('SELECT houselocations.label, houselocations.coords FROM player_houses INNER JOIN houselocations ON player_houses.house = houselocations.name where player_houses.citizenid = ?', {cid})
return result
end
**next find this line function GetPlayerApartment replace it with **
function GetPlayerApartment(cid, cb)
local result = MySQL.query.await('SELECT name, type, label FROM apartments where citizenid = ?', {cid})
return result
end
**next go to ps-mdt/server/main.lua go to line 532 and replace 532-547 with **
local Houses = {}
local properties= GetPlayerProperties(person.cid)
for k, v in pairs(properties) do
Coords[#Coords+1] = {
coords = json.decode(v["coords"]),
}
end
for index = 1, #Coords, 1 do
Houses[#Houses+1] = {
label = properties[index]["label"],
coords = tostring(Coords[index]["coords"]["enter"]["x"]..",".. Coords[index]["coords"]["enter"]["y"].. ",".. Coords[index]["coords"]["enter"]["z"]),
}
end
person.properties = Houses
end
end
What config option do you have toggled
PSHousing = true or
QBApartments
qb apartments im pretty sure
dont use ps-housing
sorry
Config.UsingPsHousing = false
Config.UsingDefaultQBApartments = false
Config.OnlyShowOnDuty = true
I entered the snippet you sent and it failed to load a profile with a fault saying player doesn't own an apartment
@tired horizon
Have it set that way
interesting , assuming you are using qbx_properties ?
Yeah I entered the snippet and I'm getting this error:
Although it would make sense because I don't have those tables, it's all handled inside the properties table so
im currently up against the same issue, were you able to fix this?