11 May 2026
This guide is for converting scripts from ESX/QBCore to HTNFW.
cid (characters.id), not source.exports['htn-framework']:CharacterInformation(source, 'all')exports['htn-framework']:getCharacterInfo('all')exports['htn-framework']:CurrencyUpdate(...)character.job.name, character.job.rank, character.job.lable, character.job.headersourcecid / stateIdexports['htn-framework']:CharacterInformation(source, 'all')exports['htn-framework']:CharacterInformation(source, 'id')exports['htn-framework']:CurrencyUpdate(stateId, 'cash' or 'bank', {_source=source, update=amount, status=true or false})status=true adds moneystatus=false removes moneyexports['htn-framework']:GetPlayerFromCid(cid)exports['htn-framework']:perm({comp='hasPermission', data={sourceId=src, event='permission_name'}})exports['htn-framework']:getCharacterInfo('all')exports['htn-framework']:getCharacterInfo('job')exports['htn-framework']:getCharacterInfo('currency')local char = exports['htn-framework']:CharacterInformation(source, 'all')
if not char then return end
local cid = char.id
local fullName = (char.first_name or '') .. ' ' .. (char.last_name or '')
local char = exports['htn-framework']:CharacterInformation(source, 'all')
if not char then return end
-- Add 500 bank
exports['htn-framework']:CurrencyUpdate(char.id, 'bank', {
_source = source,
update = 500,
status = true
})
-- Remove 200 cash
exports['htn-framework']:CurrencyUpdate(char.id, 'cash', {
_source = source,
update = 200,
status = false
})
local p = exports['htn-framework']:getCharacterInfo('all')
if not p then return end
local jobName = p.job and p.job.name or 'unemployed'
local cash = p.currency and p.currency.cash or 0
local bank = p.currency and p.currency.bank or 0
TriggerEvent('htn-framework:UpdatePlayerJob', targetStateId, {
job = 'police',
rank = 2
})