diff --git a/README - INSTALL INSTRUCTIONS/QBCore/properties_unsigned_price.sql b/README - INSTALL INSTRUCTIONS/QBCore/properties_unsigned_price.sql new file mode 100644 index 0000000..048f042 --- /dev/null +++ b/README - INSTALL INSTRUCTIONS/QBCore/properties_unsigned_price.sql @@ -0,0 +1,2 @@ +UPDATE `properties` SET `price` = 0 WHERE `price` < 0; +ALTER TABLE `properties` MODIFY COLUMN `price` INT(11) UNSIGNED NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/README - INSTALL INSTRUCTIONS/QBOX/properties_unsigned_price.sql b/README - INSTALL INSTRUCTIONS/QBOX/properties_unsigned_price.sql new file mode 100644 index 0000000..048f042 --- /dev/null +++ b/README - INSTALL INSTRUCTIONS/QBOX/properties_unsigned_price.sql @@ -0,0 +1,2 @@ +UPDATE `properties` SET `price` = 0 WHERE `price` < 0; +ALTER TABLE `properties` MODIFY COLUMN `price` INT(11) UNSIGNED NOT NULL DEFAULT '0'; \ No newline at end of file diff --git a/client/cl_property.lua b/client/cl_property.lua index 89c7f2c..94f55ca 100644 --- a/client/cl_property.lua +++ b/client/cl_property.lua @@ -879,7 +879,7 @@ function Property:UpdateOwner(newOwner) end function Property:UpdateImgs(newImgs) - self.propertyData.imgs = newImgs + self.propertyData.extra_imgs = newImgs end function Property:UpdateDoor(newDoor, newStreet, newRegion) diff --git a/server/sv_property.lua b/server/sv_property.lua index b0ae870..b5bae19 100644 --- a/server/sv_property.lua +++ b/server/sv_property.lua @@ -329,11 +329,6 @@ function Property:UpdateOwner(data) local bank = PlayerData.money.bank local citizenid = PlayerData.citizenid - self:addMloDoorsAccess(citizenid) - if self.propertyData.shell == 'mlo' and DoorResource == 'qb' then - Framework[Config.Notify].Notify(targetSrc, "Go far away and come back for the door to update and open/close.", "error") - end - 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") @@ -381,6 +376,11 @@ function Property:UpdateOwner(data) realtor.Functions.AddMoney('bank', commission, "Commission from Property: " .. self.propertyData.street .. " " .. self.property_id) + self:addMloDoorsAccess(citizenid) + if self.propertyData.shell == 'mlo' and DoorResource == 'qb' then + Framework[Config.Notify].Notify(targetSrc, "Go far away and come back for the door to update and open/close.", "error") + end + self.propertyData.owner = citizenid MySQL.update("UPDATE properties SET owner_citizenid = @owner_citizenid, for_sale = @for_sale WHERE property_id = @property_id", { @@ -404,7 +404,7 @@ function Property:UpdateImgs(data) local imgs = data.imgs local realtorSrc = data.realtorSrc - self.propertyData.imgs = imgs + self.propertyData.extra_imgs = imgs MySQL.update("UPDATE properties SET extra_imgs = @extra_imgs WHERE property_id = @property_id", { ["@extra_imgs"] = json.encode(imgs), diff --git a/shared/config.lua b/shared/config.lua index 69ce206..487e12e 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -69,9 +69,6 @@ Config.Commissions = { -- Set this value to false if you don't want to assign a starting apartment. Config.StartingApartment = true ---- With this enabled, the customizer will open when starting apartment is false. -Config.ShowCustomizerWhenNoStartingApartment = true - Config.Apartments = { ["Integrity Way"] = { label = "Integrity Way",