Client-side exports

isInOrg

Returns true if player is a member of an organization, returns false if not

exports['cs_crime']:isInOrg()

hasPermission

Returns true if player has a specified permission, returns false if not

exports['cs_crime']:hasPermission(permissionName)

notify

Returns notification logic defined in /client/editable.lua

notify = function(data)
    -- You can implement your own notification system here
    -- Default implementation using ox_lib
    lib.notify({
        title = data.title,
        description = data.description,
        type = data.type or 'info',
        duration = data.duration or 5000,
        position = data.position or 'top',
        style = data.style or {}
    })
end

exports['cs_crime']:notify({
    title = "test",
    description = "test",
    type = "success",
    duration = 5000,
    position = "top",
    style = {}
})

openCrimeMDT

Opens the MDT if player is permitted to do so, this export uses isInOrg before toggling the UI

exports['cs_crime']:openCrimeMDT()

Last updated