-
-
Notifications
You must be signed in to change notification settings - Fork 0
Module: Vehicle
Аниса edited this page Jun 16, 2022
·
22 revisions
This module provides a custom vehicle management interface to integrate w/ your resources. For servers such as DayZ
, Roleplay
, RPG
, Arenas
where saving vehicle makes sense, this module comes into the play!
Syntax #2 should only be used in conjunction w/ thread
--Syntax #1:
local bool: state = dbify.vehicle.fetchAll(
table: {
--These are conditional datas that has to be used for the query
{string: columnName, ~: columnValue},
},
function: callback(table: result, table: arguments),
~: ...arguments
)
--Syntax #2:
local table: result, table: arguments = self:await(dbify.vehicle.fetchAll(
thread: self,
table: {
--These are conditional datas that has to be used for the query
{string: columnName, ~: columnValue},
},
~: ...arguments
))
--Syntax #1:
local bool: state = dbify.vehicle.create(
function: callback(int: vehicleID, table: arguments),
~: ...arguments
)
--Syntax #2:
local int: vehicleID, table: arguments = self:await(dbify.vehicle.create(
thread: self,
~: ...arguments
))
--Syntax #1:
local bool: state = dbify.vehicle.delete(
int: vehicleID,
function: callback(bool: result, table: arguments),
~: ...arguments
)
--Syntax #2:
local bool: result, table: arguments = self:await(dbify.vehicle.delete(
thread: self,
int: vehicleID,
~: ...arguments
))
dbify.vehicle.setData(vehicleID, {
--These are vehicle datas to be updated
{dataName1, dataValue1},
{dataName2, dataValue2},
...
}, callback(result, arguments)
print(tostring(result))
print(toJSON(arguments))
end, ...)
dbify.vehicle.getData(vehicleID, {
--These are vehicle datas to be retrieved
dataName1,
dataName2,
...
}, callback(result, arguments)
print(toJSON(result))
print(toJSON(arguments))
end, ...)