Resource name
Examples use the default resource name:fa_shoprobbery with the running resource name in every export call.
GetClerkEntity
Returns the local ped entity for a configured store.
Returns the entity handle (
number) or nil when the store is unknown, the clerk is disabled, or the local entity does not exist.
GetClerkState
Returns the last published clerk state for a configured store.
Returns one of
idle, surrendering, intimidated, hostile, dead, or disabled, or nil when the store ID is unknown or the state has not been published yet.
CanUseClerkShop
Returns whether the clerk is present, alive, and currently idle.
Returns
true only while the local clerk entity exists, is alive, and has the idle state. Use this as a client-side visibility guard for a shop target.
GetClerkData
Returns the current clerk snapshot in one table.
Returns
nil when the store ID is unknown.
FindClerkStore
Finds the closest enabled clerk store within a radius. This is useful when another resource starts from its own shop location instead of FA Shop Robbery’s store ID.
Returns the closest enabled store ID or
nil when no clerk is within the radius.
Lifecycle events
Subscribe to events and refresh your target instead of caching a ped indefinitely. A killed or reset clerk can be recreated with a new entity handle.storeId, entity, state, and coords. clerkStateChanged also includes previousState. clerkRemoved includes reason.
