Skip to content

Events ​

Hook into these from other resources with AddEventHandler. They're server-local unless marked otherwise, and they fire only after np_phone has validated the action.

Core ​

EventSideArgumentsWhen
np_phone:playerReadyserversrc, playerPhone profile loaded or created. player = { source, identifier, number, name, job }
np_phone:playerUnloadedserversrc, identifier, numberLogout, character switch or drop
np_phone:openedclientPhone opened
np_phone:closedclientPhone closed

Wallet & jobs ​

EventArgumentsWhen
np_phone:invoicePaidinvoiceA business invoice was paid. invoice = { id, identifier, sender, senderJob, senderIdentifier, amount, reason, payerSource }. Credit the society account here (or use Config.City.invoicePayout)
np_phone:jobs:setDutysrc, onDutyDuty toggled in the Jobs app. Always fires, even on frameworks without duty support
np_phone:jobs:appliedsrc, jobId"Apply" in the job center

Garage ​

The fee is already charged when these fire.

EventArgumentsWhen
np_phone:garage:valetsrc, plate, vehicleValet requested (with valetSpawn = true: after a successful spawn)
np_phone:garage:impoundReleasesrc, plate, vehicleImpound release paid
np_phone:garage:shareKeyssrc, targetSrc, plateKeys shared
np_phone:garage:revokeKeyssrc, targetIdentifier, plateKeys revoked

Groups ​

EventArgumentsWhen
np_phone:groups:signIngroupId, jobId, leaderSrcThe leader signed in to a group job. Your job script drives it from here with groupStartJob / groupSetStage / …
np_phone:groups:createdgroupId, leaderSrcGroup created
np_phone:groups:disbandedgroupIdGroup disbanded
np_phone:groups:memberJoinedgroupId, src
np_phone:groups:memberLeftgroupId, src

Files ​

EventArgumentsWhen
np_phone:files:contractSignedcontractId, cParty B signed. c = { id, title, partyA, partyB, sourceA, sourceB, meta, signedAt }
np_phone:files:contractDeclinedcontractId, { id, partyA, partyB }Party B declined

Mail actions ​

Mail action buttons of type = 'event' trigger your own event:

lua
-- server (default)
TriggerEvent(event, src, args, mailId)
-- client, with data.client = true
TriggerClientEvent(event, src, args, mailId)

See City → Mail.

Example: group job ​

lua
AddEventHandler('np_phone:groups:signIn', function(groupId, jobId, leaderSrc)
  if jobId ~= 'sanitation' then return end
  exports.np_phone:groupStartJob(groupId, {
    id = 'sanitation', label = 'Sanitation', icon = 'fa-solid fa-trash-can',
    stages = { { label = 'Pick up truck at depot' }, { label = 'Collect bags', total = 8 }, { label = 'Return truck' } },
    payout = '$1.4k', next = 'Depot · Alta St',
  })
end)

-- later, from your job logic
exports.np_phone:groupSetStage(groupId, 2, { next = 'Vinewood Blvd' })
exports.np_phone:groupSetProgress(groupId, 5, 8)
exports.np_phone:groupFinishJob(groupId, { payoutEach = 350 })

Internal net events ​

np_phone:rpc, np_phone:rpc:reply, np_phone:push, np_phone:notify, np_phone:init, np_phone:requestInit, np_phone:forceClose, np_phone:calls:* and np_phone:messages:live* are np_phone's own transport. Don't trigger them or listen to them from other resources. Use the exports instead.

np_* FiveM resources