Esc to clear, Enter to open the best match, click an export to open it in its page
Building on WHIP
What a resource can change
Almost everything is done from your own resource, without editing whip_core, so WHIP's updates never undo your work. Here's where the line is.
Without touching whip_core
| You can | With |
|---|---|
Add items, stats, prompts, jobs, shops, stashes, store kinds, item windows, settings pages, Director cards, /w pages, skill check games, a voice system | Register…, Add…, Ensure…, in Whip.register (The calls you'll use) |
| Change WHIP's own rules: the respawn wait, hospitals, hunger, the lockpick game, and some 200 more | /whip → Settings → Config, or config.lua (Configuration) |
| Hold one of WHIP's things for a while | HoldRespawn (a dead player waits for a medic), HoldVehicleEngine, BlockControls, BlockHands, HoldPlayerPed |
| Refuse something of yours | canUse, canInteract, a panel's onValidate (How WHIP talks to your resource) |
| Hear what happened | Server Events, Client Events |
What you can't change
- WHIP's own items' uses (lockpick, bandage, food and drink). Register your own item, or change the item in
/whip→ Economy → Items. - The status HUD. Your stats can add gauges (
RegisterStatwithhud) andConfig.HudSkinpicks one of two looks, but it can't be turned off or redrawn. - The spawn picker's choices: last location, the presets in
config.lua, and their homes.
Replacing a screen#
| Screen | How |
|---|---|
| The look of every screen | A theme: a resource with a theme.css, chosen by Config.Theme or SetActiveTheme (Theming) |
| Inventory | Set Config.InventoryRenderer to your resource, which then draws it (the renderer seat) |
| Death screen | Config.DeathScreen = false, and draw your own from whip_core:death:screenChanged (Death & Revive) |
| Phone | Stop whip_phone and run your own, using SetScreenOpen, SetScreenArea and FreeHands |
| Chat | Any chat resource that handles the stock chat's events |
| Loading screen | Any FiveM loading screen; whip_core closes it when the player arrives |
| Status HUD, character select and creator, spawn picker, notifications, progress bar | A theme only |