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:
numbernewSpeed:
numberNew search speed in ms, 1000 = 1 second
getRandomItem
Get a random item inside specified category
exports.fivecore_looting:getRandomItem(category)category:
string
Return:
randomItem:
tableitem:
stringmetadata:
anyamount:
numberlabel:
string
createCustomSpot
Creates a new independent loot point, useful if you already have a list of coordinates
In this way of creating, you need to specify several details: the items available at the point, their coordinates, the interface text, item respawn behavior, and how the player will access the loot. If you want to create a new object, or more points from existing objects, use the built-in loot editor.
id?: string
label: string
coords: vector3
items: table
item:
stringamount:
numbermetadata?:
any
excludeEmpty?:
booleanSpot 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:
stringlabel:
stringcoords:
vector3items:
tableitem:
stringamount:
numbermetadata?:
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