Skip to content

Module: Vehicle

Аниса edited this page Dec 13, 2022 · 22 revisions

━ What's the Objective?

This module provides a custom vehicle management interface to integrate w/ your resources.

For servers such as DayZ, Roleplay, RPG, Arenas where saving vehicles makes sense, this module comes into the play!

━ APIs

━ dbify.vehicle.fetchAll() (Server)

@Objective: Fetches all existing vehicles.
local table: result, table: arguments = dbify.vehicle.fetchAll(
  table: {
    --These are conditional datas that has to be used for the query
    {string: columnName, ~: columnValue},
  },
  ~: ...arguments
)

━ dbify.vehicle.create() (Server)

@Objective: Creates a new vehicle.
local int: vehicleID, table: arguments = dbify.vehicle.create(
  ~: ...arguments
)

━ dbify.vehicle.delete() (Server)

@Objective: Deletes an existing vehicle.
local bool: result, table: arguments = dbify.vehicle.delete(
  int: vehicleID,
  ~: ...arguments
)

━ dbify.vehicle.setData() (Server)

@Objective: Sets vehicle datas of a valid vehicle.
local bool: result, table: arguments = dbify.vehicle.setData(
  int: vehicleID,
  table: {
    --These are columns that has to be updated w/ their respective values
    {string: columnName, ~: columnValue},
    ...
  },
  ~: ...arguments
)

━ dbify.vehicle.getData() (Server)

@Objective: Retrieves vehicle datas of a valid vehicle.
local table: result, table: arguments = dbify.vehicle.getData(
  int: vehicleID,
  table: {
    --These are columns whose values are to be retrieved
    string: columnName,
    ...
  },
  ~: ...arguments
)
Clone this wiki locally