AddVehicle

AddVehicle

This export does the equivalent of AddGlobalVehicle

Arguments

Argument
Description

identifier

The unique string identifier of this target, in-case you want to remove it later

options

The options for the target (see Options Formatting)

Usage

exports['nyx2_target']:AddVehicle(identifier, options)

Example

exports['nyx2_target']:AddVehicle('debug_global_vehicle', {
    {
        title = 'Push Vehicle',
        icon = 'fas fa-car',
        action = function(vehicle)
            -- push the vehicle
        end,
        canInteract = function(vehicle)
            return true
        end,
        job = nil,
        gang = nil,
        citizenid = nil,
        item = nil,
    }
})

RemoveVehicle

This export removes a vehicle target that you have created.

Arguments

Argument
Description

identifier

The unique string identifier of the target you want to remove

Example

exports['nyx2_target']:RemovePlayer('debug_global_vehicle')

Last updated