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

The calls you'll use

WHIP has about 650 exports, but a job, a shop or a mission uses about twenty. These are the ones WHIP's own resources call most. Search (/) finds the rest.

ToCallSide
Declare (in Whip.register)
Make an item, and what using it doesRegisterItem, RegisterUseHandlerServer
Accept a message from a player's game, checkedSecureEventServer
Answer a question from a player's game, checkedSecureCallback; ask it with CallbackServer; client
A prompt, a wheel option, a choice on a car partAddActionClient
A job, a stash, a shop that always existEnsureJob, EnsureContainer, EnsureShopServer
Players
Who is this (name, charId, job, session)GetPlayerServer
Tell them somethingNotifyPlayer; on the client NotifyServer; client
Remember something about a characterSetPlayerFlag, GetPlayerFlagServer
Still the same character after a wait?IsSessionCurrentServer
Money
Charge, and refund if what they paid for failsChargePlayer, RefundPlayerServer
Pay them: a wage, a rewardPayPlayerServer
Items
Give and takeAddItem, RemoveItemServer
Do they have it, how manyHasItem, GetItemCountServer
Change one item (rounds, wear, a serial)SetItemMetadataServer
Move items between any two placesStoreMoveServer
Jobs
On duty? Allowed to?IsPlayerClockedOn, HasJobPermissionServer
The world
A car for a job or a rental; read any carSpawnTempVehicle, GetVehicleServer
A blip, a waypointShowBlipServer
Timed and skilled
A bar the server times; a skill checkProgress, SkillCheckEither

How WHIP talks to your resource#

You want toUseExample
Hear that something happenedAn event: AddEventHandler('whip_core:…', fn). After the fact; it can't be stopped. On the server any resource can fire one, so check GetInvokingResource() where it matters (Server Events)whip_core:player:loaded
Hear a value changeA listener: OnStatChanged, OnVehicleStatChanged, WatchVehicleStat. Only WHIP calls it, and it's removed when your resource stopsA HUD that follows hunger
Act just before WHIP does something on the player's gameA client hook: RegisterClientHook. WHIP waits for it (up to a second) but it can't refusePut the phone away before a gun is drawn
Refuse something of your ownA check you pass in: canUse, canInteract, a panel's onValidateNo drinking in a car
Add something to WHIPRegister…, Add…, Ensure…, in Whip.registerRegisterItem, AddAction