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

Vehicles API

Calls for a car's whole life: reading it, keys and locks, making, spawning and garaging cars, ownership, appearance and the catalog. Every call names the car with a vehicle reference. New to vehicles? Read Vehicles & Keys first.

Reading a car

GetVehicle(vehicleId, opts?)SERVER#

A copy of everything the server knows about a vehicle, or nil if WHIP doesn't know it. Editing the copy changes nothing.

ParamTypeDescription
vehicleIdnumber|tableA vehicleId or a vehicle reference: { plate = }, { netId = }, { entity = }
optstable?{ occupants = true } adds who is sitting in it (slower: it checks every player)
Returns: table|nil
local v = exports.whip_core:GetVehicle(vehicleId)   -- or GetVehicle({ plate = 'ABC123' })
if not v then return false, 'No such vehicle' end
print(v.plate, v.model, v.owner.charId, v.state, v.locked)

Also on it: displayName and class (nil for a model the catalog lacks), vehType, owner.name, owner.online, garage, coords, heading, temp, session, secure, spawned, entity, netId, stats, data, properties, occupants when asked, and storage once the car's storage is loaded (storage.trunk = { slots, maxWeight, used }).

Rental or street car? session = true means nobody owns it, rentals included. temp = true means a SpawnTempVehicle car only.
GetVehicle(vehicleId)CLIENT#

Everything this client knows about a vehicle, or nil when it isn't streamed in here: live damage, colours, lock and engine state and every occupant, but not ownership or the garage. Takes a vehicleId or a vehicle reference.

Returns: table|nil: vehicleId, plate, mine, hasKey, entity, netId, model, modelHash, class (GTA's number), vehType, session, keyInIgnition (your car only), coords, heading, locked, engineOn, engineHealth, bodyHealth, colorPrimary, colorSecondary, occupants ({ seat, ped, isPlayer, serverId }), stats (a copy, defaults filled in), data
local v = exports.whip_core:GetVehicle({ entity = GetVehiclePedIsIn(PlayerPedId(), false) })
GetVehiclesOf(who)SERVER#

Every vehicle a person owns, as full snapshots.

ParamTypeDescription
whonumber|tableA person: a server id, or { charId = n }, online or not
Returns: table[], or {}, why when who names nobody
IsPlayerDrivingVehicle / IsPlayerInVehicleSERVER#

Is this player driving this vehicle, or in it at all? Three natives and no copy, so prefer these to GetVehicle on a hot path.

ParamTypeDescription
sourcenumberPlayer server id
vehicleIdnumberVehicle ID
Returns: boolean
GetVehicleDriver(vehicle)SERVER#

Whose game drives this car: the player at the wheel, or the one whose game plays a Director take (a recorded drive) on it. Ask before moving a car to another game to pull it: a take's game reclaims its car every two seconds.

ParamTypeDescription
vehiclenumber|tableA vehicleId, { netId } / { entity } (any networked car, WHIP's or not), or { plate }
Returns: source, 'seat' | 'take', or nil when nobody drives it (parked, an NPC at the wheel)
GetPlayerVehicle(source, opts)SERVER#

Which WHIP car this player sits in, from the server's view, not the client's word. An in-car item (nitrous, a part fitted from inside) starts here.

ParamTypeDescription
sourcenumberPlayer server id
optstable?{ driver = true }: only the driver's seat counts
Returns: vehicleId, or false, why, a sentence for the player: not in a vehicle, not driving, or a car WHIP doesn't look after
GetPlayerSeat(source)SERVER#

Which seat this player is in, as the server sees it, in any vehicle including street cars. Seat -1 is the driver's, 0 the front passenger's, then the rear seats.

ParamTypeDescription
sourcenumberPlayer server id
Returns: { seat, driver, vehicleId, netId } (vehicleId is nil for a street car), or false, why: not in a vehicle, or still getting in
PutInSeat(who, vehicle, seat, opts?)SERVER#

Put a player, one of WHIP's NPCs or any ped into a seat, by its own door or at once. The game that runs them does it, and it is done when the server sees them in that seat. Each has one job: a new one ends the last. One of WHIP's NPCs gets in as its own Get In task, in place of the tasks it had.

ParamTypeDescription
whonumber|tableA player's server id, { entity = ped }, { netId = n } or { npc = npcId }
vehiclenumber|tableA vehicle reference, or { entity } / { netId } for any vehicle, a street car too
seatnumber|string-1 the driver's, 0 the front passenger's, then the rear; 'any' (the first free) or 'nearest'
optstable?how 'walk' (default) or 'warp'. ifTaken when someone sits there: 'refuse' (default), 'other' (another free seat), 'wait' (another, then over to its own once free) or 'jack' (pull them out; still there after jackMs, 10 s, they are put out unless held). moving 'wait' (default: no walk to a moving vehicle) or 'warp'. pace 'walk' or 'run'. elsewhere: already in it, move to another seat. warpAfter, timeoutMs (ms). force: off a hold first. onEnd(ok, why): called once when it is over
Returns: true, jobId, or false, why (the seat is taken and ifTaken is 'refuse', they are held in another vehicle, no such vehicle)
Whip.core:PutInSeat(source, { netId = taxiNet }, 'nearest', { ifTaken = 'other', onEnd = function(ok, why)
    if not ok then Whip.core:NotifyPlayer(source, why, 'error') end
end })
TakeOutOfSeat(who, opts?)SERVER#

Get a player or a ped out of whatever they sit in. A door against a wall: out at once after a while. Someone dead in their seat is laid beside their door. Someone held is only taken out with force, which lets go of every hold on them.

ParamTypeDescription
whonumber|tableAs PutInSeat's
optstable?how 'walk' (default) or 'now'. moving while the vehicle moves: 'wait' (default, until it stops), 'jump' (bail out) or 'now'. timeoutMs, force, onEnd(ok, why)
Returns: true, jobId (true alone when they are not in a vehicle; onEnd is told at once), or false, why
HoldInSeat(who, reason, opts?)SERVER#

Keep a player or a ped in the seat they sit in now until you call ReleaseSeatHold with the same reason, or your resource stops. Several reasons stack, from any resources. A player who presses the exit is told they can't get out right now. Moving them within the same vehicle takes the hold along. One of WHIP's NPCs is held by its own ride.

ParamTypeDescription
whonumber|tableAs PutInSeat's
reasonstringA short name of your own ('escort', 'ride')
optstable?Each on unless false: noExit (their exit is held), noJack (nobody can pull them out, and they never go through the windscreen), putBack (thrown out alive, they are put back in). tag: a run tag that releases it
Returns: true, or false, why (not in a vehicle)
ReleaseSeatHold(who, reason)SERVER#

Let go of the hold you put on them for reason. Another resource's holds on them stay.

Returns: true, or false, why
GetSeat(who)SERVER#

Which seat a player or a ped sits in, as the server sees it, and whether something holds them there.

Returns: { seat, driver, netId, vehicleId, held } (vehicleId is nil for a street car), or false, why
GetSeatHolder(vehicle, seat)SERVER#

Who sits in a seat of a vehicle.

Returns: { source, held } for a player, { npc, entity, held } for a ped (npc only for one of WHIP's NPCs), or false, 'Nobody sits there'
GetVehiclePosition(vehicleId)SERVER#

Where a vehicle is right now, for a distance check or a blip. A garaged, despawned or lost car returns nil, so a near check fails. Last seen: GetVehicle(id).coords. A SecureEvent with a 'vehicle' param checks distance with near = { at = 'vehicle' }.

Returns: x, y, z, or nil if the car isn't in the world
IsVehicleWrecked(vehicle)SERVER#

Is this car blown up or sunk? A job's "car lost" check. The game running the car reports a sinking.

ParamTypeDescription
vehiclenumber|tableA vehicle reference
Returns: boolean: false for a car not out in the world

Keys and locks

A car's boot, glovebox and ignition are stores: address them as { kind = 'vehicle', id = vehicleId, sub = 'trunk' } (or 'glovebox', 'key'), where id may be a reference such as { plate = 'ABC 123' }. Use StoreRead, StoreCount, GetItemAt, StoreGive, StoreTake, StoreMove, OpenStore and CloseStore.

SetVehicleLocked(vehicleId, locked)SERVERWAITS#

Lock or unlock a vehicle; saved, and whip_core:vehicle:lockChanged fires when the state changes. After a restart a car is as it was left, except one locked with its own key in the ignition, which is unlocked. A car leaving a garage is locked unless its own key is in the ignition.

ParamTypeDescription
vehicleIdnumber|tableA vehicle reference
lockedbooltrue = locked
Returns: bool, string|nil
GiveVehicleKey(who, vehicleId, opts?)SERVERWAITS#

Put a vehicle_key for the car in a player's inventory. A player who already holds one is refused, unless opts.spare asks for another.

ParamTypeDescription
whonumber|tableA person who is playing: server id, or { charId = n }
vehicleIdnumberVehicle ID
opts.sparebooltrue cuts a key even when they hold one, a second key to hand to someone
Returns: true, or false, reason ('Already has a key for this vehicle', no room, not online)
ChangeVehicleLocks(vehicleId)SERVERWAITS#

Change an owned car's locks. Every key of it cut so far stops fitting, wherever it is: someone's pockets (playing or not), a stash, a boot, its own ignition or the ground. Keys cut after fit, and the change lasts through a restart. A car running on an old key in its ignition stops. Old keys stay where they are as items that no longer open anything. A street car or a temporary one is refused; a temporary car takes secure = true instead.

-- The owner lost a key: new locks, and one new key for them
local ok, why = exports.whip_core:ChangeVehicleLocks(vehicleId)
if ok then exports.whip_core:GiveVehicleKey(source, vehicleId) end
ParamTypeDescription
vehicleIdnumber|tableA vehicle reference
Returns: true, or false, reason ('Only a car someone owns', 'Vehicle not found', a save that failed)
CountVehicleKeys(vehicleId)SERVERWAITS#

How many keys fit the car now, wherever they are: every character's pockets (playing or not), every stash, every car's boot, glovebox and ignition, and the ground. A key inside another item (a bag), a resource's own stores and an open panel's slots aren't counted. Keys from before a ChangeVehicleLocks don't fit, so they aren't counted either.

ParamTypeDescription
vehicleIdnumber|tableA vehicle reference
Returns: number, or false, reason (no such vehicle, the database couldn't be read)
RemoveVehicleKey(who, vehicleId)SERVERWAITS#

Take every key that fits this car from all of a player's containers: an impound confiscating keys.

ParamTypeDescription
whonumber|tableA person who is playing: server id, or { charId = n }
vehicleIdnumberVehicle ID
Returns: bool, string?: true if any key was removed, else false and why ('They have no key for that vehicle', 'Player not loaded', ...)
HasVehicleKey(who, vehicleId)SERVERWAITS#

Whether a person has a key for the vehicle in their pockets. A character who isn't playing is read from the database.

ParamTypeDescription
whonumber|tableA person: a server id, or { charId = n }
vehicleIdnumber|tableA vehicle reference
Returns: bool, string?: false and why when it couldn't ask (no such person, a bad reference)
GetPlayerVehicleKeys(who)SERVERWAITS#

Every vehicle key in a person's pockets. A character who isn't playing is read from the database.

ParamTypeDescription
whonumber|tableA person: a server id, or { charId = n }
Returns: { [vehicleId] = plateText }; {}, why for no such person

Engine holds

HoldVehicleEngine(vehicleId, key, reason)SERVER#

Keep a car's engine off and tell the driver why: no fuel, a flat battery, an immobiliser. While any hold is on, the engine won't start and a running one stops; the car still rolls. A hold ends when you release it, your resource stops, or the car's id goes for good.

ParamTypeDescription
vehicleIdnumberVehicle ID
keystringNames your hold; the same key again replaces its reason
reasonstringShown to the driver, 80 letters at most
Returns: true, or false, why (no such vehicle)
ReleaseVehicleEngine(vehicleId, key?)SERVER#

Release your hold key; with no key, all your holds on the car.

Returns: true when one went, false, why when you had none
GetVehicleEngineHold(vehicleId)SERVER#

Whether anything holds the car's engine off, whoever's hold it is.

Returns: the reason shown, or nil

Making cars

CreateOwnedVehicle(source, data, opts)SERVERWAITS#

Make a car owned by a player's character, the only way a resource mints one. With opts it also spawns the car and gives the key; if either fails the car is removed and you get false, reason. The owner comes from the player record, never from data.

ParamTypeDescription
sourcenumberThe receiving player
datatable{ model, plate?, garage?, stats?, properties?, vehType?, trunkSlots?, trunkMaxWeight?, gloveboxSlots?, gloveboxMaxWeight? }
data.statstable?Starting values, { fuel = 100 }; one left out reads its registered default
data.garagestring?An existing garage (GetNearestGarage, GetGarage); default the default garage
data.vehTypestring?Left out, the catalog's class picks bike, boat, heli or plane
optstable?{ giveKey?, spawnAt? }: spawnAt (vector4, vector3 or { x, y, z, heading }) makes it out there; else it starts garaged. data.state = 'out' without it is refused; data.x/y/z aren't read
Returns: number|false vehicleId, string|nil err, boolean|nil saved. Read the plate from GetVehicle(vehicleId).plate. Refused before any car is made: an occupied spawnAt ('Something is already parked in that spot'), or a builder in Isolate world ('Leave Isolate world first: cars come out in the shared world')
local canOut, outWhy = exports.whip_core:CanBringOutVehicleFor(source)
if not canOut then return false, outWhy end
local receipt, err = exports.whip_core:ChargePlayer(source, 250000, { reason = 'Adder' })
if not receipt then return false, err end

local vehicleId, why = exports.whip_core:CreateOwnedVehicle(source, { model = 'adder' }, {
    giveKey = true, spawnAt = vector4(-56.7, -1097.2, 26.4, 160.0),
})
if not vehicleId then exports.whip_core:RefundPlayer(receipt) return false, why end
Don't refund on false, err, true. saved means a database fault after the car was saved with the payment; it reaches their garage with its key once it reads back. Refund only on a plain false.
CanBringOutVehicleFor(source)SERVER#

Whether a car can be brought out for this player now. Ask before charging for a car with spawnAt: a builder in the Director's Isolate world is refused, since cars come out in the shared world.

ParamTypeDescription
sourcenumberThe player the car is for
Returns: boolean ok, string|nil why
VehicleModelExists(model)SERVER#

Whether this game has a vehicle called model, add-ons included. Players' games report their lists at the character screen; the server saves them per platform and game build and drops a name unreported for 14 days. Spawning a missing model is refused with 'There is no vehicle called "x" in this game'.

ParamTypeDescription
modelstringThe model name, like 'sultan'
Returns: boolean|nil: nil before any game has reported, or for a model not on a full list (20,000 names); nothing is refused then, so test == false
SpawnTempVehicle(model, coords, opts)SERVERWAITS#

A temporary car: a rental, a job van, a test drive. Nobody owns it and it's never saved, but it has an id, stats, data, a boot and keys. It's removed when your resource stops, despawnAfter runs out, nobody is near for ten minutes, or DespawnVehicle; its key goes too and whip_core:vehicle:released fires.

ParamTypeDescription
modelstringVehicle model name
coordsvector4|vector3|tableWhere; { x, y, z, heading } works too
opts.forSourcenumber?Who it's for; they get a key unless giveKey = false
opts.despawnAfternumber?Seconds until it's removed
opts.lockedboolean?Spawns locked; false stands open
opts.keyInIgnitionboolean?A key in the ignition, so anyone at the wheel can start it
opts.idleDespawnboolean?false: never removed for being left alone
opts.tagstring?One of your tags: ReleaseTag removes the car and stops new spawns
opts.secureboolean?No lockpick or hack; only a key cut for this car works
opts.forceboolean?Spawn on an occupied spot (GTA pushes things aside); else refused
opts.plate, opts.vehTypeanyNormally left out
Returns: number|false vehicleId, string|nil err
local vehicleId, err = exports.whip_core:SpawnTempVehicle('blista', vector4(x, y, z, h), {
    forSource = source, despawnAfter = 1800,   -- a rental, gone in half an hour
})
despawnAfter removes the car even while driven. Warn the driver first.
ClaimVehicle(vehicle, who, opts) · SetVehiclePlate(vehicle, plate)SERVERWAITS#

ClaimVehicle makes a car nobody owns (temp or street) an owned one: the end of a boosting job. The new car (new id, new plate unless given) keeps the model, look, fuel, boot and glovebox, and takes the old one's place with the driver still in it. A failure changes nothing; a model the catalog doesn't know is refused. SetVehiclePlate changes any car's plate; old keys still fit.

ParamTypeDescription
whonumber|tableA person: server id, or { charId = n }
opts.platestring?Its new plate (8 characters at most, unused); default a new one
opts.hereboolean?false: put away in their garage instead
opts.garagestring?Its garage (default the default garage)
opts.keyboolean?false: no key for them
opts.reasonstring?For their activity log
opts.leavefunction?function(metadata, item): true leaves that stack in the old car
Returns: ClaimVehicle: the new vehicleId (plus a note when it waits in its garage), or false, reason; fires whip_core:vehicle:claimed. SetVehiclePlate: true, or false, reason; fires whip_core:vehicle:plateChanged
AdoptVehicle(plate | { entity } | { netId })SERVERWAITS#

Register a car already in the world as a session vehicle; a car WHIP knows returns its id. It never creates a car. On the client, ResolveVehicle does this from an entity.

ParamTypeDescription
refstring|table{ entity = vehicle }, { netId = networkId }, or a plate (the first car wearing it). Prefer the car
ref.playernumber?When a player's action brings it in: counts against their street-car limit (20)
Returns: number|false vehicleId, string|nil err
Not a lookup. It searches every car and pins the one it finds (GTA can't clear it), without the player limits (20 m, 20 cars). To read by plate, use GetVehicle({ plate = }).

In and out of the world

SpawnVehicle(vehicleId, coords?)SERVERWAITS#

Put a vehicle in the world; the server creates the entity. A car already out is moved, not cloned.

ParamTypeDescription
vehicleIdnumberThe vehicle to place
coordsvector3|vector4?Default its saved position; a vector4's w is the heading. Refused if occupied: 'Something is already parked in that spot', 'Someone is standing in that spot'
Returns: number|false: the network ID, or false and an error
DespawnVehicle(vehicleId, opts?)SERVERWAITS#

Take a vehicle out of the world into the garage it's filed under, even with somebody inside; storage is flushed first. It stays put away after a restart. A temp car is removed for good.

ParamTypeDescription
vehicleIdnumber|tableA vehicle reference
opts.garagestring?Put it away in this garage instead (an impound). Only an owned car that is out: 'A street car cannot be put in a garage', 'A temporary car cannot be put in a garage', 'Vehicle is already stored', 'No such garage: …'
opts.refuseOccupiedboolean?Refuse a car with somebody inside: 'Somebody is still in that vehicle'. On by default with a garage, off without one
Returns: boolean ok, string|nil err: success if already out of the world; false, 'Vehicle is busy' mid-spawn, store or delete (retry shortly)
A street car stays in the world. WHIP hands it back to GTA and forgets it: its id means nothing, its boot and glovebox items are logged as lost, and released fires.
RetrieveVehicle(vehicleId, garageKey)SERVER#

Take a vehicle out of a garage: marks it out and locked. Then spawn it where you choose.

ParamTypeDescription
vehicleIdnumberVehicle ID
garageKeystring?Default: its own garage
Returns: boolean ok, string|nil err
local ok, err = exports.whip_core:RetrieveVehicle(vehicleId)
if ok then exports.whip_core:SpawnVehicle(vehicleId, vector4(x, y, z, heading)) end

Ownership

TransferVehicle(vehicleId, newOwner, opts)SERVERWAITS#

Sell a vehicle to another player. Writes the owner, re-syncs both players' lists and fires whip_core:vehicle:ownerChanged.

ParamTypeDescription
vehicleIdnumberVehicle ID
newOwnernumber|tableThe buyer: an online server id, or { charId = n } for an online or offline character that exists and is not deleted
optstable?{ giveKey, revokeOldKeys, expectedOwner }. Key options default true and only affect online players. expectedOwner is the expected current owner character id; a changed owner is refused
Returns: boolean, string|nil: 'No such character', 'Vehicle ownership changed', 'Vehicle is in custody', 'Session vehicles have no owner' (use ClaimVehicle), 'Already owned by that character'
The seller can keep a working key. revokeOldKeys only empties their pockets while online; keys in a stash, a boot, on the ground or in the ignition still work. With full pockets the buyer gets no key and this still returns true.
SetVehicleCustody(ref, held, expectedOwner)SERVERWAITS#

Hold an owned vehicle for the calling resource. While that resource runs, retrieval, spawning, transfer and deletion are refused, including calls from the holder. Release the hold before those actions. Another running resource cannot replace or release it; a stopped resource's hold is ignored. The stored claim is not erased on stop and becomes active again if that resource restarts.

ParamTypeDescription
refnumber|tableVehicle id or vehicle reference; session cars are refused
heldbooleantrue to hold, false to release
expectedOwnernumber?Expected owner character id; refuses a changed owner
Returns: boolean ok, string|nil reason

This only changes the hold. It does not despawn, garage, lock or move a car. To impound, use CreateGarage for a lot without a position, then DespawnVehicle(vehicleId, { garage = 'impound', refuseOccupied = true }). Release any hold before RetrieveVehicle and SpawnVehicle.

DeleteVehicle(vehicleId)SERVER#

Destroy an owned car for good, with its boot, glovebox, ignition and entity, in one transaction. Items are logged as lost; fires whip_core:vehicle:deleted. Any resource may call it, so check who may first.

ParamTypeDescription
vehicleIdnumberVehicle ID
Returns: boolean, string|nil
A street car stays in the world, forgotten; a temp car is removed. To make a street car vanish, read its entity first, then DeleteVehicle and DeleteEntity.

Appearance

Properties are GTA's look on an entity, set on the client (SetVehicleProperties). Appearance is the look WHIP stores for a vehicleId, on the server. A shop holds the car, previews with properties, saves what was paid for with SetVehicleAppearance, strips the rest with RestoreVehicleAppearance, then releases the hold.

SetVehicleAppearance(vehicleId, props, opts?)SERVERWAITS#

Change and store how a vehicle looks. Props merge over the current look, one level into mods, so setting mod 11 keeps mod 23. Performance mods are allowed; plate and model are never written.

ParamTypeDescription
vehicleIdnumberVehicle ID
propstableFields to apply ({} for none)
optstable?data = { key = value }, clearData = { 'key' }: your vehicle data, in the same write
Returns: true, or false, why with nothing changed. A session car (street, rental) keeps the look only while it exists
exports.whip_core:SetVehicleAppearance(vehicleId, { mods = { ['23'] = 4 }, color1 = 27 },
    { data = { myStance = { height = -0.05 } } })
RestoreVehicleAppearance(vehicleId)SERVER#

Push the stored look back onto the car for everyone: the undo for a client's preview.

ParamTypeDescription
vehicleIdnumber|tableA vehicle reference
Returns: boolean, string|nil
Previews replicate. Mods set by the client in control show to everyone, so an abandoned preview leaves unpaid parts on until this runs.
HoldVehicleAppearance(vehicleId, held)CLIENT#

Mark a car as being previewed, so WHIP doesn't report or log the preview. If your resource stops while holding it, WHIP restores the stored look.

ParamTypeDescription
vehicleIdnumberVehicle ID
heldbooleantrue to hold, false to release
Returns: true, or false, reason: another resource holds it, or the hold isn't yours. Releasing an unheld car is true
Always release it, on close and on death, or this client never reports the car again.

Catalog and pictures

GetVehicleCatalog()SERVER#

The vehicle catalog, keyed by model: 930 cars from server/vehicle_catalog_list.lua, plus packs' cars from RegisterVehicles. A car has a picture when a media pack, or WHIP's CDN, has its img/vehicles/<model>.webp.

Returns: a copy, { [model] = { model, displayName, class, hasImage, image, inGame } }: image is a URL for your NUI or false; don't sell inGame == false
RegisterVehicles(list)SERVERWAITS#

Add a car pack's cars to the catalog while the pack runs. The list is the whole list: a car left out later goes, and all go when the pack stops. A model WHIP lists already keeps its name and class and takes your picture. List pictures in your files { }.

ParamTypeDescription
listtable[]{ model, name, class, image }; class is a name below or GetVehicleClass's number
Returns: true, or false, why and nothing added (missing model, unknown class, picture not in your resource, another pack's model)
Whip.register(function()
    Whip.core:RegisterVehicles({
        { model = 'mypack_gt', name = 'Velo GT', class = 'sports', image = 'img/mypack_gt.webp' },
    })
end)

Classes: compacts sedans suvs coupes muscle sportsclassics sports super motorcycles offroad industrial utility vans cycles boats helicopters planes service emergency military commercial trains openwheel.

GetVehicleImage(model)SERVER#

The URL of a vehicle's picture for any resource's NUI: from its media pack over cfx-nui, or from WHIP's CDN when that pack isn't installed.

ParamTypeDescription
modelstringModel name, any case
Returns: string|nil: e.g. https://cfx-nui-whip_media_previews/img/vehicles/sultan.webp, or https://media.whipfx.net/media/img/vehicles/sultan.webp?v=v1.0.0
HasVehicleImage(model)SERVER#

Whether a model has a picture.

ParamTypeDescription
modelstringModel name, any case
Returns: boolean