Esc to clear, Enter to open the best match, click an export to open it in its page
Concepts

Registering with WHIP

Items, stats, secure events, callbacks, actions, zones, store kinds: everything a resource registers with WHIP follows one rule, so running your registration twice is always safe.

You registerWhat happens
Something newIt's yours. Returns true
The same thing againNothing: no reset, no re-broadcast
A changed version of your ownIt replaces yours
Something another resource registeredRefused: false, 'item "x" belongs to other_resource', also printed once in the console (F8 on a client) and listed in the setup report
A name starting whip_core:Refused: those are WHIP's own

When your resource stops, what it registered is removed. Items are the exception, since players still carry them, but they stop being yours and another resource may take the name.

Prefix names with your resource's name#

Item keys, right-click action names, stats, vehicle stats, server zone ids and permissions share one list per server, and the first resource to register a name owns it. Start each with your resource's name and an underscore: mycafe_coffee, mycafe_stress. Events and callbacks use a colon: mycafe:buy. An unprefixed name still works, but the console lists it once:

[whip_core] mycafe registers 3 items whose names do not start with "mycafe" (coffee, bagel, tea). ...
Names WHIP already uses. Items phone, sim_card, rope, radio, megaphone, nitro, whip_gunny's weapons, magazines and ammo (weapon_pistol and the like), and every item in whip_core's config.lua; vehicle stats nitro, boost and fuel. /whip → Economy → Items shows each key's owner.

Listing registrations, and run tags#

GetRegistrations shows who holds a name that was refused. Run tags let a mission or heist clean up everything it made in one call: pass { tag = 'run:42' } in a registration's options (on modules that support it), then ReleaseTag.

GetRegistrations(resource?)CLIENTSERVER#

Everything registered with WHIP on this side (events, callbacks, items, stats, actions, stat listeners, client hooks, settings, /w pages, debug tools, held props), or one resource's share.

ParamTypeDescription
resourcestring?Only this resource's registrations; everything when omitted
Returns: table[]: { { registry, key, owner }, … }
for _, r in ipairs(exports.whip_core:GetRegistrations(GetCurrentResourceName())) do
    print(r.registry, r.key)
end
ReleaseTag(tag)CLIENTSERVER#

Removes everything your resource registered under a run tag, in every WHIP module, and closes the tag: later registrations under it are refused with "… has ended". Use a new tag for each run; releasing one never touches another run or another resource's things.

ParamTypeDescription
tagstringYour run's label, e.g. 'run:42' (up to 100 characters)
Returns: true, count (how many things were removed), or false, why for an empty or over-long tag
local tag = 'heist:' .. jobId
exports.whip_core:SpawnNpc({ model = 's_m_m_security_01', coords = guardPos, behaviour = 'guard' }, { tag = tag })
exports.whip_core:SpawnTempVehicle('stockade', vanPos, { tag = tag })

-- The job is over: the guard and the van go
local ok, count = exports.whip_core:ReleaseTag(tag)
GetTagged(tag)CLIENTSERVER#

What your resource holds under a run tag, across WHIP's modules.

ParamTypeDescription
tagstringYour run's label
Returns: table[]: { { registry, key }, … }; empty for an unknown or bad tag