Esc to clear, Enter to open the best match, click an export to open it in its page
Get Started
Coming from QBCore, ESX or ox
WHIP is a framework of its own, with no bridge from QBCore, ESX or ox: a resource written for one of them won't run unchanged. Porting a small job means rewriting its glue code (about a day), and most of what it did by hand becomes one WHIP call.
Keep, replace, remove
| Resource | With WHIP |
|---|---|
oxmysql | Keep: WHIP uses it. Ensure it before WHIP's resources |
qb-core, es_extended, qbx_core, ox_core | Remove: one framework at a time. The setup report flags one that's running |
ox_inventory, qb-inventory | Remove: WHIP has its own (F2) |
ox_target, qb-target | Replace with AddAction |
ox_lib | Its helpers (math, tables, lib.waitFor) are fine. For anything on screen, use WHIP's UI library: WHIP keeps one screen open at a time, and ox_lib's screens don't know about WHIP's |
| Garages, keys, fuel, banking, doorlock, housing, shops, multicharacter, spawn, HUD | Remove: each is part of WHIP. Fuel is whip_fuel |
| pma-voice, mumble-voip | Remove if you use whip_voice |
Calls you know
| QBCore / ESX / ox | WHIP |
|---|---|
GetCoreObject(), getSharedObject() | Nothing to fetch: add dependency 'whip_core' and @whip_core/lib/satellite.lua to the manifest, then call Whip.core:… inside Whip.register and exports.whip_core:… anywhere else |
QBCore.Functions.GetPlayer(src), ESX.GetPlayerFromId(src) | GetPlayer(source): a plain table with no methods; act through exports |
PlayerData.citizenid, xPlayer.identifier | player.charId (a number; save this one) |
PlayerData.job, xPlayer.job | On duty: GetPlayerJob(source) (nil off duty). Has the job at all: GetPlayerRole(source, 'police') |
PlayerData.gang | No gangs: make a gang a job with EnsureJob |
PlayerData.metadata | SetPlayerFlag or SetPlayerMetadata |
AddMoney, xPlayer.addMoney | PayPlayer (cash, or method = 'bank') |
RemoveMoney, xPlayer.removeMoney | ChargePlayer, which returns a receipt for RefundPlayer |
| Cash as a number on the player | Cash is an item (banknotes): it can be dropped, stolen or stashed |
shared/items.lua, ox_inventory/data/items.lua | RegisterItem in your resource, or /whip → Economy → Items |
CreateUseableItem, ESX.RegisterUsableItem | RegisterUseHandler; pass a table for a timed use |
AddItem / RemoveItem | AddItem, RemoveItem, GetItemCount |
ox_inventory:RegisterStash | EnsureContainer |
RegisterNetEvent on the server | SecureEvent (side by side) |
CreateCallback / TriggerCallback, lib.callback | SecureCallback / Callback: return the answer, no cb |
qb-target:AddBoxZone, ox_target:addSphereZone, addLocalEntity | AddAction with at = { coords }, { entity }, { model } or { vehiclePart }. job = 'police' becomes require = { job = 'police' }; distance becomes reach |
qb-menu, lib.registerContext | No list menu: use options on a prompt (menus) or a select field in Input |
QBCore:Notify, lib.notify | NotifyPlayer (server), Notify (client), or return false, 'why' from a SecureEvent |
Progressbar, lib.progressBar | Progress, on the server for anything handed out at the end |
lib.skillCheck, lib.inputDialog, lib.alertDialog | SkillCheck, Input, Alert / Confirm |
lib.showTextUI, DrawText3D | ShowText (client), ShowPlayerText (server); usually a prompt says it already |
PolyZone, lib.zones | Zones (EnsureZone) |
qb-vehiclekeys, SetFuel, qb-garages | GiveVehicleKey; the 'fuel' vehicle stat (whip_fuel); Garages; SpawnTempVehicle for a job car |
SetVehicleProperties(veh, props) | SetVehicleProperties({ entity = veh }, props) on the client: a bare number is a vehicleId. To keep the look, SetVehicleAppearance on the server |
AddBlipForCoord + SetBlipRoute | ShowBlip from the server, with route = true |
| qb-doorlock, ox_doorlock | EnsureDoors (Doors) |
Lang:t(), locales | No locale system: your resource's text is your own |
What will surprise you
- Declarations go in
Whip.register, not straight to whip_core at the top of a file (the one rule). - "Their job" means on duty.
GetPlayerJobisniloff duty;GetPlayerRoleis for "works there at all". Players clock on in the phone's Business app, or your resource callsClockOn. - Pay with
PayPlayer, charge withChargePlayer. There is no lower-level cash call. - A receipt lasts 30 minutes. After that, give money back with
PayPlayer. - A bar on the player's game is their word. For anything handed out at the end, use the server's
Progressor a timed use. - Exports return
false, 'why'instead of throwing (Return values).
A qb delivery job, call by call
| The qb job does | The WHIP version does |
|---|---|
A job in shared/jobs.lua | Whip.core:EnsureJob('delivery', { … }) in Whip.register |
qb-target box at the depot, job = 'delivery' | AddAction({ at = { coords = DEPOT }, require = { job = 'delivery', onDuty = true }, … }) |
Van deposit: RemoveMoney('bank', 500) | ChargePlayer(source, 500, { method = 'bank' }); keep the receipt |
CreateVehicle + vehiclekeys + SetFuel | SpawnTempVehicle: the driver gets a key, and the van goes when you despawn it, after despawnAfter, or when your resource stops |
Packages: AddItem + ItemBox | StoreGive into the van's boot, or AddItem |
| Blip and route to the drop-off | ShowBlip({ people = { source } }, 'drop', { coords = DROP, route = true }) |
Progressbar, then TriggerServerEvent('delivery:pay') | A prompt at the door; a SecureEvent with near runs the server's Progress, takes the package and pays. near closes the classic exploit of firing the pay event from anywhere |
Pay: AddMoney('cash', 120) | PayPlayer(source, 120, { reason = 'Delivery' }) |
| Van back: refund the deposit | RefundPlayer(receipt) within 30 minutes; after that PayPlayer |
The whole job is in whip_core/docs/examples/whip_delivery_example, including what happens when the driver logs out or the van is taken back. Copy it into your resources and ensure it.