API
All exports and events that script provides for developers.
Exports
startTreeBuild
Start prop placer for building tree.
Side:
clientUsage:
--- void
exports.rcore_xmas:startTreeBuild()startSnowmanBuild
Start prop placer for building snowman.
Side:
clientUsage:
--- void
exports.rcore_xmas:startSnowmanBuild()isEntitySnowmanPart
Returns true/false if provided entity is part of building process of man snowman
Side:
clientUsage:
local entity = ...
--- snowmanPart: boolean (true/false)
local snowmanPart = exports.rcore_xmas:isEntitySnowmanPart(entity)
if snowmanPart then
...
endgetTrees
Returns table of all cached trees from database around map
Side:
serverUsage:
--- {
---
--- [key: id]: string = {
--- model: int,
--- coords: vector3,
--- rotation: vector3,
--- heading: float,
--- owner: string
--- }: table
---
--- }: table
local cachedTrees = exports.rcore_xmas:getTrees()
for treeId, tree in pairs(cachedTrees) do
local model = tree.model
local coords = tree.coords
local rotation = tree.rotation
local heading = tree.model
local owner = tree.model
...
endgetTreesByOwner
Returns table of all cached trees from database around map by provided owner id in parameter
Side:
serverUsage:
local client = source?
--- {
---
--- [key: id]: string = {
--- model: int,
--- coords: vector3,
--- rotation: vector3,
--- heading: float,
--- owner: string
--- }: table
---
--- }: table
local trees = exports.rcore_xmas:getTreesByOwner(client)getCollectedPresents
Returns all player's collected presents for present hunt directly and synchronously from database
Side:
serverUsage:
local client = source?
--- {
---
--- [key: presentId]: string = boolean
---
--- }: table
local collectedPresents = exports.rcore_xmas:getCollectedPresents(client)getSpawnedSnowmans
Returns all currently spawned snowmans.
Side:
serverUsage:
--- {
---
--- [key: id]: string = Entity (number)
---
--- }: table
local snowmans = exports.rcore_xmas:getSpawnedSnowmans()isEntitySnowman
Returns if entity in parameter is snowman built by script
Side:
serverUsage:
--- boolean (true/false)
local entity = ...
if exports.rcore_xmas:isEntitySnowman(entity) then
...
endgetPresentsPositions
Returns table of all positions from
shared/present-hunt/sh-positions.luafor present huntSide:
sharedUsage:
--- {
---
--- {
--- position: vector3,
--- rotation: vector3
--- }: table
--
--- }: table
local presentsPositions = exports.rcore_xmas:getPresentsPositions()Last updated
Was this helpful?