录制相关 API

RecordVehicle

函数作用:记录载具轨迹
基本构造:RecordVehicle( vehicle, name, id )
示例代码:

local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
local name    = "testdrive" -- 轨迹文件名
local id      = 1           -- 轨迹文件 ID
exports.zerodream_records:RecordVehicle(vehicle, name, id)

StopVehicleRecord

函数作用:停止记录载具轨迹
基本构造:StopVehicleRecord()
示例代码:

exports.zerodream_records:StopVehicleRecord()

CancelVehicleRecord

函数作用:取消记录载具轨迹
基本构造:CancelVehicleRecord()
示例代码:

exports.zerodream_records:CancelVehicleRecord()

IsVehicleRecordExists

函数作用:判断载具轨迹文件是否存在
基本构造:IsVehicleRecordExists( name, id, isPreStream )
示例代码:

local name        = "testdrive" -- 轨迹文件名
local id          = 1           -- 轨迹文件 ID
local isPreStream = false       -- 是否是预加载文件(prestream 文件夹内)
local exists      = exports.zerodream_records:IsVehicleRecordExists(name, id, isPreStream)
print(exists and "载具轨迹文件存在" or "载具轨迹文件不存在")