A standalone utility for managing licenses, such as driving or firearm licenses, independent of any framework. It provides functionality to fetch, update, and check license statuses both client and server-side.
Client Functions
get_licences
Gets all licence data for the player and logs response.
Function
localfunctionget_licences() utils.callback.cb('boii_utils:sv:get_licences', {}, function(licences_data)if licences_data thendebug_log('info', 'Licenses data fetched: '.. json.encode(licences_data))elsedebug_log('err', 'Failed to fetch licences data.')endend)endexports('get_licences', get_licences)utils.licences.get_licences = get_licences
--- Define licence idlocal licence_id ='driving'--- Define test typelocal test_type ='theory'--- Utils objectutils.licences.check_licence(licence_id, test_type, function(has_passed)if has_passed thenprint("Player has passed the theory test.")elseprint("Player has not passed the theory test.")endend)--- Direct exportexports.boii_utils:check_licence(...)