#Qbx_properties

1 messages · Page 1 of 1 (latest)

finite grove
#

Hello everyone, I have a simple question.

When I create or buy a house created via script qbx_properties, where does the money go? I don't see it in the company bank account. I am debited but not credited in the company.

Have an idea or modification to suggest to me?

strong notch
#

by the looks of it it just removes the money and it goes no where LUA if not player.Functions.RemoveMoney('cash', property.price, string.format('Purchased %s', property.property_name)) and not player.Functions.RemoveMoney('bank', property.price, string.format('Purchased %s', property.property_name)) then exports.qbx_core:Notify(playerSource, 'Not enough money to purchase property.', 'error') return

#

you want the money to get into the realessate bank ya ?

strong notch
#

this may work i havent tested it tho so good luck add this too qbx_properties:server:buyProperty under LUA MySQL.update('UPDATE properties SET owner = ? WHERE id = ?', {player.PlayerData.citizenid, propertyId})

MySQL.update('UPDATE bank_accounts_new SET amount = amount + ? WHERE id = ?', {property.price, 'realestate'})```
finite grove
strong notch
#

i sent the code

finite grove
finite grove
#

@strong notch
I'll get back to you, I actually inserted your SQL line, it works without problems (it is correctly inserted in my SQL)

On the other hand, it is only visible ingame when I do a reboot.
Perhaps do a check or a verification to be done during a purchase which will update it in Renewed-Banking ( @hollow stag 👀 )

In any case I can ask the player to take it to roleplay (if I do a daily reboot) while a possible update is done

quartz mural
#
  1. reverse changes you made before
  2. add this at line 400 in qbx_properties/server/property.lua
finite grove