Server-Side

Server Exports

Below are all the useful exports that you can use in other resources, be sure to read their descriptions.


registerToPickup

---@param {src: number}: player id
---@param {name: string}: document name (key from Config.Documents)
---@param {photoId: number}: photo id

---@return {serialNumber: string}
exports['vms_documentsv2']:registerToPickup(src, name, photoId, function(serialNumber)

end)

pickupDocument

---@param {src: number}: player id
---@param {serialNumber: string}: 

---@return {success: boolean}
exports['vms_documentsv2']:pickupDocument(src, serialNumber, function(success)

end)

removePhoto

---@param {identifier: string}: player identifier
---@param {photoId: number}: photo id
exports['vms_documentsv2']:removePhoto(identifier, photoId)

getMyPhotos

---@param {identifier: string}: player identifier

---@return table
local photos = exports['vms_documentsv2']:getMyPhotos(identifier)

getMyDocuments

---@param {identifier: string}: player identifier

---@return table
local documents = exports['vms_documentsv2']:getMyDocuments(identifier)

giveDocument

---@param {src: number}: player id
---@param {name: string}: document name (key from Config.Documents)
---@param {photoId: number}: photo id
exports['vms_documentsv2']:giveDocument(src, name, photoId)

invalidateDocument

---@param {identifier: string}: player identifier
---@param {serialNumber: string}: document serial number
exports['vms_documentsv2']:invalidateDocument(identifier, serialNumber)

isAnyDocumentValid

---@param {identifier: string}: player identifier
---@param {name: string}: document name (key from Config.Documents)
exports['vms_documentsv2']:isAnyDocumentValid(identifier, name)

Last updated