Bans vehicles for everyone except specific users.
Signature:
declare function banVehicles(vehicles: (Vehicles | string)[], action: (vehicle: Vehicle) => void, allowlist?: Allowlist): (vehicle: Vehicle) => void;#Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
vehicles |
(Vehicles | string)[] |
A list of vehicles to ban. |
|
action |
(vehicle: Vehicle) => void |
Callback function executed when a match is found. |
|
allowlist |
(Optional) Users which can use the vehicle. |
Returns:
(vehicle: Vehicle) => void
Callback function to pass into client event.
#Example
client.on(ERLCEvents.vehicleAdd, banVehicles([ Vehicles.STRUGATTI_ETTORE_2020 ], VehiclePunishments.warnThenKick()))