Server Functions

setPlayerSearchSpeed

Update the search speed for each player item, which by default is 2 seconds (2000)

exports.fivecore_looting:setPlayerSearchSpeed(playerId, newSpeed)
  • playerId: number

  • newSpeed: number

    • New search speed in ms, 1000 = 1 second

getRandomItem

Get a random item inside specified category

exports.fivecore_looting:getRandomItem(category)
  • category: string

Return:

  • randomItem: table

    • item: string

    • metadata: any

    • amount: number

    • label: string

createCustomSpot

Creates a new independent loot point, useful if you already have a list of coordinates

circle-exclamation
  • id?: string

  • label: string

  • coords: vector3

  • items: table

    • item: string

    • amount: number

    • metadata?: any

  • excludeEmpty?: boolean

    • Spot should be automatically deleted when there are no more items

Return:

  • spotId: string

Example:

removeCustomSpot

Remove a created custom spot

  • spotId: string

getCustomSpot

Get all data for a custom spot

  • spotId: string

Return:

  • spot: table

updateCustomSpot

Update data for a custom spot

  • spotId: string

  • label: string

  • coords: vector3

  • items: table

    • item: string

    • amount: number

    • metadata?: any

attachSpotToNetId

Attach a created custom spot to a especific netId as a ped, object or a vehicle. Can be useful for adding loot after an entity dies, for example

  • spotId: string

  • netId: number

Example:

Last updated