📄
jaksam's scripts documentation
  • 💻jaksam's scripts
    • Home
    • How to update the scripts
    • Fix server crash on script start
    • Issues with items
    • Manually set ESX shared object
    • Common FAQ
    • Nexus Terms
    • LICENSE
  • ⚠️FiveM escrow system errors
    • Home
    • Error parsing script ... <\1>
    • Failed to verify protected resource
    • You lack the required entitlement
    • What to do if nothing is fixing the errors
  • 💼Jobs Creator
    • Home
    • Installation
    • FAQ
    • Modules
    • Replacing default scripts names
    • Replacing default events names
    • Updating script from old versions
    • QBCore Jobs Injection
    • Client
      • Notifications
        • Replace default notifications
        • Replace help notification/TextUI
      • Actions
        • Using the actions in a radial/external menu
        • Replace default search action
        • Get player allowed actions
        • Open actions menu
        • Integrate external impound script
        • Vehicle repaired
        • Get if local player is handcuffed
      • Duty
        • Duty status toggled
        • Toggle current duty status
      • Buyable vehicles
        • Vehicle spawned
        • Vehicle parked
      • Garage owned
        • Vehicle spawned
        • Vehicle parked
      • Temporary garage
        • Vehicle spawned
        • Vehicle parked
      • Replace Stash/Safe/Armory
      • Replace default billing
      • Progress bar
    • Server
      • Armory
        • Add weapon to armory
        • Remove weapon from armory
        • Get player armory weapons
        • Get all armory weapons
      • Boss
        • Add society account money
        • Remove society account money
        • Get job account money
        • On player fired
        • On player hired
      • Buyable vehicles
        • Get if player is owner of vehicle plate
        • Get all vehicles of player
        • On vehicle bought
        • Get player vehicles in marker ID
      • Crafting table
        • Item crafted
      • Duty
        • Duty status changed
        • Get if a player is on duty
      • Harvest
        • Item harvested
      • Market
        • Item sold
      • Process
        • Item processed
      • Shop
        • Item bought
      • Search/Steal action
        • Item stolen
        • Account stolen
        • Weapon stolen
      • Set handcuffs state
  • 💰Robberies Creator
    • Home
    • Installation
    • FAQ
    • Modules
    • How to edit minigames
    • Client
      • Progress bar
      • Replace default police alert
      • Notifications
        • Replace default notifications
        • Replace default help notifications
    • Server
      • Heist started
      • Heist finished
      • Police alerted
      • Step completed
  • 💡Missions Creator
    • Home
    • Installation
    • How to start
    • How to add minigames
    • Client
      • Replace default police alert
      • On entity spawn
      • Notifications
        • Replace default notifications
        • Replace default help notifications
        • Replace default mugshot notifications
    • Server
      • Police alerted
      • On mission start
      • On mission failed
      • On mission success
  • 🛒Shops Creator
    • Home
    • Installation
    • How to use images for items
    • Client
      • Replace default police alert
      • Notifications
        • Replace default notifications
        • Replace default help notifications
    • Server
      • Police alerted
      • Shop bought
      • Shop sold
      • Get what objects can be sold in shop ID
      • Get objects in shop ID
  • 🚗Dealerships Creator
    • Home
    • Installation
    • Adding custom vehicles/classes
    • Client
      • On test drive vehicle spawn
      • Notifications
        • Replace default notifications
        • Replace default help notifications
      • Showroom
        • On showroom enter
        • On showroom exit
        • Get Is Player In Showroom
        • Get Is Player Doing Test Drive
    • Server
      • On vehicle given
      • On vehicle resell
  • 🏁Races Creator
    • Home
    • Installation
    • Client
      • Replace default police alert
      • Notifications
        • Replace default notifications
        • Replace default help notifications
    • Server
      • Police alerted
  • 📍Blips Creator
    • Home
    • Installation
    • FAQ
    • How to use custom sprites
    • Client
      • Open menu manually
  • 🚪Doors Creator
    • Home
    • Installation
    • FAQ
    • Modules
    • Change doors icon
    • Admin bypass lock
    • Client
      • Replace default notifications
      • Get closest door
      • Toggle icon display
      • Replace default police alert
      • Get door ID from entity
    • Server
      • Refresh database
      • Police alerted
      • Get door ID data
      • Get building ID data
      • Get all buildings list
      • Get all doors list
      • Set door ID state (locked/unlocked)
      • Lockpicked door
      • Create building
      • Create door
      • Delete door
      • Update door
  • 💊Drugs Creator
    • Home
    • Installation
    • FAQ
    • Modules
    • Client
      • Replace default notifications
      • Progress bar
      • Replace default mugshot notifications
      • Replace default help notifications
      • Replace default police alert
      • Manually start drugs effects
      • NPC Selling
        • Disable default selling method for NPCs
        • Add ped to selling blacklist
        • Remove ped from selling blacklist
        • Manually sell to a NPC
        • NPC accepted drug
    • Server
      • Fields
        • Item harvested
      • Harvestable items
        • Item harvested
      • Laboratories
        • Successful craft
      • Sellings
        • Sold to pusher
        • Sold in boat
        • Sold in plane
        • Sold to NPC
        • Sold to narcos
      • Police alerted
      • Pocket crafting finished
  • 🚜Farming Creator
    • Home
    • Installation
    • Client
      • Replace default notifications
      • Progress bar
      • Replace default help notifications
      • Replace default police alert
    • Server
      • Police alerted
      • Item farmed
  • 🛰️Trackers Creator
    • Home
    • Installation
    • FAQ
    • Optimization
    • Client
      • Replace default notifications
      • Panic button pressed
      • Manually start panic button
    • Server
      • Panic button pressed
      • Player lost signal
      • Player set new private frequency
  • 🔑Vehicles Keys
    • Home
    • Installation
    • FAQ
    • How to give keys with /car command
    • Fix hotwiring bought car
    • Lock/unlock vehicle
    • Client
      • Self give current vehicle plate
      • Self give vehicle plate
      • Self remove vehicle plate
      • Open remote UI menu
      • Open keys list
      • Toggle hotwiring
      • Get if local player owns a plate
      • Get owned plates of local player
      • Toggle closest vehicle lock
      • Switch vehicle lock
      • Vehicle locked/unlocked
      • Replace/Disable default progress bar
      • Refresh self owned vehicles
      • Replace default police alert
      • Notifications
        • Replace default notifications
        • Replace default help notifications
      • Bypass start vehicle check
    • Server
      • Refresh player owned vehicles
      • Get if player ID owns a plate
      • Vehicle locked/unlocked
      • Player hotwired a vehicle
      • Player lockpicked a vehicle
      • Give keys to identifier
      • Remove keys from identifier
      • Give keys to player ID
      • Remove keys from player ID
      • Vehicle window broken
      • Get player ID keys
      • Get identifier keys
      • Police alerted
      • Alarms
        • Alarm activated (player vehicle)
        • Alarm activated (NPC vehicle)
  • 🧾Billing UI
    • Home
    • Installation
    • Client
      • Activate billing mode
      • Open billing menu
      • Replace default notifications
      • Pay a bill
      • Send a bill
      • View invoices
    • Server
      • Create bill
      • Delete bill
      • Refresh bill
      • On bill created
      • On bill paid
  • ✅Easy allowlist
    • Home
    • Installation
    • FAQ
    • Commands usage
    • How to enable Discord features
    • External deferrals
    • Server
      • Allowlist
        • Remove identifier from allowlist
        • Add identifier to allowlist
      • Queue
        • Set player queue priority
        • Set discord role queue priority
        • Set identifier queue priority
        • Remove identifier queue priority
        • Remove discord role queue priority
        • Get count of players currently in queue
        • Get queue info
  • 👜Luxury Clothes Theft
    • Home
    • Installation
    • Client
      • Replace default notifications
Powered by GitBook
On this page
  • Refresh player owned vehicles
  • Event
  • Parameters
  • Give keys to identifier
  • Example

Was this helpful?

  1. Vehicles Keys
  2. Server

Refresh player owned vehicles

Refresh player owned vehicles

Using this export (from server side) will refresh the list of the player's owned vehicles (from owned_vehicles on ESX or player_vehicles on QBCore)

Event

exports["vehicles_keys"]:refreshPlayerOwnedVehicles(playerId, instantly)

Parameters

Give keys to identifier

Name
Data Type
Description

playerId

integer

The player server ID

instantly

boolean

OPTIONAL - By default, it will wait 2 seconds before actually refreshing, if you know for sure that you need it instantly, pass true as second parameter, otherwise can be empty

Example

RegisterNetEvent("vehicle_shop:playerBoughtVehicle", function(playerId, plate)
    -- This will refresh the player's owned vehicles after he buys a vehicle (just an example)

    exports["vehicles_keys"]:refreshPlayerOwnedVehicles(playerId)
end)
PreviousServerNextGet if player ID owns a plate

Last updated 2 years ago

Was this helpful?

🔑