@@ -210,14 +210,29 @@ end)
210
210
RegisterNetEvent (' qb-houses:server:viewHouse' , function (house )
211
211
local src = source
212
212
local pData = QBCore .Functions .GetPlayer (src )
213
-
214
213
local houseprice = Config .Houses [house ].price
215
214
local brokerfee = (houseprice / 100 * 5 )
216
215
local bankfee = (houseprice / 100 * 10 )
217
216
local taxes = (houseprice / 100 * 6 )
217
+ TriggerClientEvent (' qb-houses:client:viewHouse' , src , houseprice , brokerfee , bankfee , taxes , pData .PlayerData .charinfo .firstname , pData .PlayerData .charinfo .lastname )
218
+ end )
218
219
219
- TriggerClientEvent (' qb-houses:client:viewHouse' , src , houseprice , brokerfee , bankfee , taxes ,
220
- pData .PlayerData .charinfo .firstname , pData .PlayerData .charinfo .lastname )
220
+ RegisterNetEvent (' qb-houses:server:openStash' , function (CurrentHouse )
221
+ local src = source
222
+ local houseData = Config .Houses [CurrentHouse ]
223
+ if not houseData then return end
224
+ local houseTier = houseData .tier
225
+ local stashSlots = Config .StashWeights [houseTier ].slots
226
+ local stashWeight = Config .StashWeights [houseTier ].maxweight
227
+ if stashSlots and stashWeight then
228
+ exports [' qb-inventory' ]:OpenInventory (src , CurrentHouse , {
229
+ maxweight = stashWeight ,
230
+ slots = stashSlots ,
231
+ label = houseData .adress
232
+ })
233
+ else
234
+ exports [' qb-inventory' ]:OpenInventory (src , CurrentHouse )
235
+ end
221
236
end )
222
237
223
238
RegisterNetEvent (' qb-houses:server:buyHouse' , function (house )
0 commit comments