RE:CORD
Events and handlers

Server events

Events and handlers for REC_Core, with configuration and implementation details.
Added
Updated

REC_Core emits local events for other resources on the same side. Event names use the resource name as a prefix, followed by server or client and the event key. The examples below assume the resource is named REC_Core.

EventArgumentsPayload
REC_Core:server:onPlayerLoadedplayerId, payloadcitizenId, character
REC_Core:server:onPlayerUnloadedplayerId, payloadcitizenId, reason
REC_Core:server:onCharacterCreatedplayerId, payloadcitizenId, character
REC_Core:server:onCharacterDeletedplayerId, payloadcitizenId
REC_Core:server:onMoneyChangeplayerId, payloadcitizenId, account, action, amount, delta, balance, reason, resource
REC_Core:server:onOfflineMoneyChangepayloadcitizenId, account, action, amount, delta, balance, reason, resource
REC_Core:server:onJobUpdateplayerId, payloadcitizenId, job, oldJob
REC_Core:server:onGangUpdateplayerId, payloadcitizenId, gang, oldGang
REC_Core:server:onDutyChangeplayerId, payloadcitizenId, onDuty, job
REC_Core:server:onCharinfoChangeplayerId, payloadcitizenId, key, oldValue, newValue, charinfo
REC_Core:server:onMetadataChangeplayerId, payloadcitizenId, key, oldValue, newValue
REC_Core:server:onValueChangeplayerId, payloadcitizenId, namespace, dataKey, oldValue, newValue
AddEventHandler("REC_Core:server:onMoneyChange", function (playerId, payload)
    if payload.delta == 0 then
        return
    end

    print(("^5[REC_Core] citizenId: %s, account: %s, delta: %d^0"):format(payload.citizenId, payload.account, payload.delta))
end)

amount is the amount passed to the operation; for setMoney it is the new balance. delta is always the new balance minus the old one. Unload reasons are logout, disconnect, or stop. Offline money changes have no connection ID argument. A duty change emits the server onDutyChange event; it is synchronized as a job update on the client.

©2026 RE:CORD Development Group. All rights reserved.