Optional Integrations

8. Optional integrations

Photo upload and webhooks

Configured inside Admin Panel → Settings, not in config.lua. Until photo upload is configured, the starter-licence photo flow reports "not configured". Provider fields: installation/photo-and-webhooks.md.

Starter licences on character creation

qb-clothing, illenium-appearance, esx_skin and vms_charcreator are auto-detected. Mark a template Grant on first spawn in the License Editor and it is granted when the player finishes character creation. Per-integration trigger paths: installation/clothing-appearance.md.

Points system (per-licence penalty points)

Configured in server/bridge/points/config.lua, an editable bridge file. Keyed by template_id; a template that crosses its threshold can be revoked automatically or fire an event:

PointsSystem.Config = {
    enabled = true,
    perTemplate = {
        ['driving_license'] = { threshold = 12, action = 'revoke' },
    },
}
exports['ph-licensecreator']:AddLicensePoints(source, 'driving_license', 4)
exports['ph-licensecreator']:GetLicensePoints(source, 'driving_license')

Every threshold crossing also fires:

AddEventHandler('ph-licensecreator:server:pointsThresholdReached',
    function(citizenid, issuedId, license_id, points, threshold) end)

Server exports for your other resources

exports['ph-licensecreator']:HasLicense(citizenid, license_id)
exports['ph-licensecreator']:GetLicense(citizenid, license_id)
exports['ph-licensecreator']:GetActiveLicenses(sourceOrCitizenid)
exports['ph-licensecreator']:AddLicenseToPlayer(source, license_id)
exports['ph-licensecreator']:RevokeLicense(issuedIdOrCitizenid, licenseId)
exports['ph-licensecreator']:ActivateLicense(issuedIdOrCitizenid, licenseId)

Full signatures and overloads: installation/exports.md. MDT / police revoke examples with permission checks: installation/revoke_license_integration.md.