API

Integrate Camping with your system

Server Events

Extinguish fire

If fireplace object exists on provided coords, player is in allowed distance and fireplace is lighted, the object is deleted and replaced with object specified in config

TriggerEvent('rcore_camping:extinguish', objCoords)

Light fireplace

If fireplace object exists on provided coords, player is in allowed distance and fireplace is not lighted, player needs any item specified in Config.LightItems (flint by default) and after successful usage of light item the item is removed and the object is deleted and replaced with inFireObject specified in config

TriggerEvent('rcore_camping:fire', objCoords)

Add fuel to fireplace

If fireplace object exists on provided coords, player is in allowed distance and fireplace is lighted, player needs 'wood' item, the item is removed and fireplace duration is increased on success

TriggerEvent('rcore_camping:addFuel', objCoords)

Cook on fireplace

If fireplace object exists on provided coords, player is in allowed distance and fireplace is lighted, player needs item specified in Config.FireCraftable and after some time the item is replaced with result item

Clear campign object

If any camping object exists on provided coords while player is in allowed distance, the object is removed and added into player's inventory (this does not apply for fireplace)

Enter a tent

If tent object exists on provided coords, player is in allowed distance and not already in any tent, player enters the tent.

Take a beer from beerkeg

If beerkeg object exists on provided coords, player is in allowed distance and beerkeg is not empty, player takes beer from beerkeg

Sit on chair

If chair object exists on provided coords, player's state of sitting is updated with provided true/false value

Place a camping object

places a camping object on coords

Place a camping object

server event which places a camping object on coords

Cancel placement

cancels current placement of camping object and returns last camping item used to player's inventory

Leave a tent

If player is in any tent, player leaves the tent

Camping object placed

server event called when camping object is placed on coords

Camping object cleared

server event called when camping object is cleared on coords

Last updated

Was this helpful?