Development Guide
Building a Vcore Resource
A recommended integration pattern for building Vcore resources.
Get the Core Object
lua
local VCORE = exports.core:getCoreObject()Declare dependencies
fxmanifest.lua
dependencies { 'core'
}Many Base resources also declare specific resources such as inventory, logs, banking or polyzone. Declare what your resource genuinely requires.
Use callbacks
lua
-- server
VCORE.Functions.CreateCallback('example:getData', function(source, cb) local Player = VCORE.Functions.GetPlayer(source) if not Player then return cb(nil) end cb({ citizenid = Player.PlayerData.citizenid })
end)Keep validation server-side
Vcore wrappers do not make client input trusted. Validate ownership, permissions, money and identifiers on the server.
