You are giving this error when trying to take an item out of the safe after placing it
i understand what you gotta do is.
for x = 1, #props, 1 do
local coords = GetEntityCoords(PlayerPedId())
local distance = GetDistanceBetweenCoords(coords, props[x].x, props[x].y, props[x].z, true)
if distance <= 2.5 then
if props[x].locked == 0 or props[x].owner == true then
TriggerEvent("SM_Properties:Option", "Deposit Item", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
OpenPlayerInventoryMenu()
else
end
end)
TriggerEvent("SM_Properties:Option", "Remove Item", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
OpenRoomInventoryMenu()
else
end
end)
end
if props[x].owner == true then
if props[x].locked == 1 then
TriggerEvent("SM_Properties:Option", "Unlock", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
TriggerServerEvent('SM_Properties:UpdateStorageLock', {x = props[x].x, y = props[x].y, z = props[x].z}, 0)
props[x].locked = 0
else
end
end)
elseif props[x].locked == 0 then
TriggerEvent("SM_Properties:Option", "Lock", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
TriggerServerEvent('SM_Properties:UpdateStorageLock', {x = props[x].x, y = props[x].y, z = props[x].z}, 1)
props[x].locked = 1
else
end
end)
end
end
end
end
change this to this
for x = 1, #props, 1 do
for z =1, #Furniture, 1 do
for w =1, #Furniture[z].items, 1 do
local coords = GetEntityCoords(PlayerPedId())
local distance = GetDistanceBetweenCoords(coords, props[x].x, props[x].y, props[x].z, true)
if distance <= 2.5 and Furniture[z].items[w].propName == props[x].name and Furniture[z].type == "Storage" then
if props[x].locked == 0 or props[x].owner == true then
TriggerEvent("SM_Properties:Option", "Deposit Item", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
OpenPlayerInventoryMenu()
else
end
end)
TriggerEvent("SM_Properties:Option", "Remove Item", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
OpenRoomInventoryMenu()
else
end
end)
end
if props[x].owner == true then
if props[x].locked == 1 then
TriggerEvent("SM_Properties:Option", "Unlock", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
TriggerServerEvent('SM_Properties:UpdateStorageLock', {x = props[x].x, y = props[x].y, z = props[x].z}, 0)
props[x].locked = 0
else
end
end)
elseif props[x].locked == 0 then
TriggerEvent("SM_Properties:Option", "Lock", {props[x].x, props[x].y, props[x].z}, 2.0, function(cb)
if(cb) then
TriggerServerEvent('SM_Properties:UpdateStorageLock', {x = props[x].x, y = props[x].y, z = props[x].z}, 1)
props[x].locked = 1
else
end
end)
end
end
end
end
end
end
try that out.
@DandoGame must have mysql setup wrong or something, send screenshots of database for me.
perfect bro. many thanks. Now I have houses that users can furnish with the furniture they buy from the furniture store. this is really cool
It would be nice if you added the option to remove the objects. Because many times they appear wrongly placed and I have to delete the furniture from the sql, buy it again and install it in the house. If it could be removed to put it back … it would be great
alot of the code for that is there, all you need to do is uncomment out the pickup option, add code to edit it on the database and boom
works with new esx?
yes it does
My knowledge only modifies part of the codes. I wish I knew how to create that, but unfortunately I have no idea. So I asked him if you could implement it. I’m sure everyone could use it
maybe one day, i don’t really wanna do it right now. if someone else does ill push the update.
I’m actually quite impressed with this, although the table names and script looks very similar to discworlds property system. Was this based on it? I went through and added all existing mlo instance interiors into this and may clone and remap them for more locations soon.- will try a pull request/share it so people don’t need to spend so long typing them out like I did
It is not didn’t even know he released one, made it all from scratch. by all means i’ll merge it if all looks good
That would be awesome!!! Also, I am having trouble figuring out how to buy the properties, did you happen to get that working?
You hold E when you get close to the door.
I tried that but for some reason it just says “Enter”
Send me screen shots of the database. The data part of it.
the data side please.
To install this script, you must delete the esx_property?
as far as i know no.
I thought that is the data side?