Server
Server exports
ApplyVehiclePreset
Applies a preset to a specified vehicle based on the provided preset ID
-- Example
exports.kq_emergency:ApplyVehiclePreset(
vehicle, -- integer - Entity
presetId, -- integer - The ID of the preset to apply
temporary, -- boolean - If the application should not be saved
usedItem -- boolean - Whether the item was used
)
-- Returns: boolean
RemoveVehiclePreset
Removes any applied emergency loadouts from the vehicle
-- Example
exports.kq_emergency:RemoveVehiclePreset(
vehicle, -- integer - Entity
player -- (optional) - integer - Player ID who may receive the Emergency Lights kit item if one was used for installation
)
-- Returns: boolean
GetPresetById
Retrieves a specific preset based on its ID
-- Example
exports.kq_emergency:GetPresetById(
id -- integer
)
-- Returns: table (preset)
GetPresets
Retrieves all saved presets
-- Example
exports.kq_emergency:GetPresets(
model, -- (OPTIONAL) string|integer - Model of the vehicle to filter presets for, if nil all presets will be returned
)
-- Returns: table
GetVehiclePresetId
Retrieves the preset ID of the preset which is currently applied onto a vehicle. Returns nil
if none is applied
-- Example
exports.kq_emergency:GetVehiclePresetId(
vehicle -- integer - Entity
)
-- Returns: integer - Preset ID
OpenApplyMenu
Opens the "Apply" menu for the specified player. The player must have enough permissions to open the menu for it to open.
-- Example
exports.kq_emergency:OpenApplyMenu(
player, -- integer - Player ID
temporary, -- boolean - Whether the preset should be temporary (not stored in the database)
usingItem, -- bolean - Whether the Emergency Lights kit item should be required to apply a preset
)
-- Returns: boolean - Whether the menu was opened. It will not open if the player does not have enough permissions
Last updated