Server Functions
setPlayerSearchSpeed
Update the search speed for each player item, which by default is 2 seconds (2000)
playerId:
number
newSpeed:
number
New search speed in ms, 1000 = 1 second
getRandomItem
Get a random item inside specified 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
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:
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