FreeScriptsDocsSupport

Browse

  • Documentation
    • FAQ
  • 📱 Phone
    • 🧠 Installation
    • 🦄 Unique phones
    • 💿 Configure
      • 💄 Additional Features
      • 📸 Camera
      • 📹 Video Calls
      • 🍏 Apps
      • 🪵 Logs
      • 🔋 Battery System
      • 🖼️ Media Customization
      • 🗣️ Multi-Language Support
      • 🗃️ SIM Cards
      • 🚗 Valet System
      • 🖼️ Wallpapers App
      • ⛅ Weather Widget
    • ⏭️ Exports
      • Client side
        • 👁️‍🗨️ General
        • 📞 Calls
        • ☀️ Groups
        • 🏢 Companies
        • 🔧 Misc
        • 🗼 Signal Towers
      • Server side
        • 🆔 Identify Player
        • ☎️ Sim Cards
        • 📞 Calls
        • 💬 Messages
        • ☀️ Groups
        • 🌐 Cell Broadcast
        • 💸 YPay
        • 📧 Mail
        • 📪 Notifications
        • 📵 Screen Damage
        • 🗯️ Dark Chat
        • 🔧 Misc
    • 🪛 Commands
    • 📡 Events
      • Server side
        • 📨 Messages
        • 📱 Social Media
        • ☎️ Calls
    • 🍎 Custom apps
    • 🏦 Banking App
    • 📈 Markets App
    • 👜 State bags
  • ☎️ Boomer Phone
    • 🧠 Installation
    • 🦄 Unique phones
    • ⏯️ Exports
      • Client side
  • 🏠 Properties
    • 🧠 Installation
    • 💿 Configure
    • 🔗 Compatibility
      • Phones
        • YSeries
        • LB Phone
    • 📖 Guides
      • 🛏️ Starter Apartments
      • 🐚 Add More Shells
      • 🔑 Physical Keys
      • 🪑 Furniture As Items
      • 🛠️ Fix Interactable Points
      • 📋 Discord Logs Setup
    • ⏭️ Exports
      • Client side
        • GetCurrentPropertyId
        • GetCurrentProperty
        • IsPointInsideProperty
        • OpenPropertyMenu
        • AddKey
        • RemoveKey
        • SetWaypointToProperty
        • GetAllProperties
        • GetKeyHolders
        • PoliceRaidDoor
        • WrapIntoProperty
        • GetClosestDoor
        • GetEntryCoordinates
        • UseLockpick
        • PoliceRaidDoor
      • Server side
        • GetAllProperties
        • GetPropertyData
        • AddKey
        • RemoveKey
        • ToggleDoorlock
        • GetPlayersInProperty
        • GetKeyHolders
        • DeleteProperty
        • AddStarterApartment
        • SellProperty
        • TransferProperty
    • 🪝 Hooks System
      • buyProperty
      • rentProperty
      • sellProperty
      • deleteProperty
      • createDoor
      • saveSettings
      • setInteractablePoint
      • canEnter
      • canExit
    • 👜 State bags
  • 🏦 Banking
    • 🧠 Installation
    • 🪛 Commands
    • ⏯️ Exports
      • Client side
      • Server side
    • 🪵 Logs
    • 🪝 Hooks
    • 🏦 Banking App
  • 💸 Billing
    • 🧠 Installation
    • ⏭️ Exports
      • Client side
      • Server side
  • 📊 Hud
    • 🧠 Installation
    • ⏭️ Exports
      • Client side
  • 📦 Storage Units
    • 🧠 Installation
  • 🎰 Slots
    • 🧠 Installation
    • 📱 Phone app
  • 🎃 Minigames
    • 🎯 Exports and Usage
    • 🔧 Commands

saveSettings

Description

Triggered when property settings are saved. This occurs when players modify configuration options for their properties such as access permissions, appearance settings, or functional parameters.

Payload Structure

lua
{
    source = playerId,      -- The player's server ID
    player = playerData,    -- Player data object from framework
    propertyId = propertyId,-- Property identifier
    settings = data             -- {price: number, rentPrice: number, label: string, description: string, forSale: boolean, forRent: boolean, forMortgage: boolean, tags: table<string>, images: table<string>, allowedPoints: table<string>}
}

Parameters

  • source (number): The server ID of the player saving the settings
  • player (table): Complete player data object provided by the framework (ESX/QBCore)
  • propertyId (string/number): Unique identifier for the property whose settings are being saved
  • settings (table):
PropertyTypeDescription
pricenumberSelling price of the property
rentPricenumberRental price of the property
labelstringShort label or title for the property
descriptionstringDetailed description of the property
forSalebooleanIndicates if the property is for sale
forRentbooleanIndicates if the property is available for rent
forMortgagebooleanIndicates if the property is available for mortgage
tagstableList of tags associated with the property
imagestableList of image URLs for the property
allowedPointstableList of points or features allowed for the property

Usage Example

lua
exports.nolag_properties:registerHook('saveSettings', function(params)
    local source = params.source
    local player = params.player
    local propertyId = params.propertyId
    local settings = params.settings

    print(('Player %s is saving settings for property %s'):format(
        source, 
        propertyId
    ))
    
    -- Validate settings changes
    if not validateSettings(settings) then
        TriggerClientEvent('chat:addMessage', source, {
            args = {'System', 'Invalid settings configuration'}
        })
        return false -- Cancel settings save
    end
    
    -- Check for restricted settings
    if hasRestrictedSettings(settings) and not hasAdminPermission(source) then
        TriggerClientEvent('chat:addMessage', source, {
            args = {'System', 'You do not have permission to modify these settings'}
        })
        return false -- Cancel if restricted settings without permission
    end
    
    -- Log settings changes
    logSettingsChange(source, settings, propertyId)
    
    -- Trigger settings update notifications
    notifyPropertyMembers(propertyId, 'settings_updated', settings)

    return true -- Allow settings to be saved
end)

Common Setting Types

  • access: Player access permissions and key management
  • functionality: Feature toggles and behavioral settings
  • security: Security measures and protection settings
  • automation: Automated systems and scheduling

Return Values

  • true or nil: Allow the settings to be saved
  • false: Cancel the settings save operation

On this page

  • Description
  • Payload Structure
  • Parameters
  • Usage Example
  • Common Setting Types
  • Return Values

All Rights Reserved

TeamsGG © 2026

Pages

FreeScriptsDocsSupport

Legal

Terms of ServiceRefunds

Tebex

Tebex ImpressumTebex TermsTebex Privacy

Socials

DiscordYouTube