🎉 Character is released. Read more →
Paid Scripts
License Manager
Exports
server
Getlicense

GetLicense

This exports retrieves license information, including label, validity period, and prices.

exports.bcs_licensemanager:GetLicense(license, cb)

Parameters

ParamsData TypeDescription
licensestringLicense name
cb (optional)functionCallback function return data

Example

HasLicense

This exports checks if a player has a license

exports.bcs_licensemanager:HasLicense(target, license)

Parameters

ParamsData TypeDescription
targetnumberThe player server id
licensestringLicense name (not label)

Example

local have = exports.bcs_licensemanager:HasLicense(source, 'weapon')
if have then
    print('The player has weapon license!')
else
    print('The player does not have the weapon license')
end
local license = exports.bcs_licensemanager:GetLicense('weapon')
print(json.encode(license, {indent = true}))
 
-- Or 
exports.bcs_licensemanager:GetLicense('weapon', function(license)
    print(json.encode(license, {indent = true}))
end)
Last updated on