--[[ https://github.com/overextended/ox_lib This file is licensed under LGPL-3.0 or higher Copyright © 2025 Linden ]] ---@alias VehicleType 'automobile' | 'bike' | 'boat' | 'heli' | 'plane' | 'submarine' | 'trailer' | 'train' ---@class Vehicle : GameEntity ---@field private new VehicleConstructor lib.vehicle = lib.class('Vehicle', lib.gameEntity) lib.vehicle.type = lib.vehicle.__name ---@class VehicleConstructor ---@overload fun(self: Vehicle, handle: number): Vehicle function lib.vehicle:constructor(handle) self:super() self:setHandle(handle) end function lib.vehicle:__index(index) if index == 'handle' then return self.private.handle end return lib.vehicle[index] end ---@return VehicleType function lib.vehicle:getType() return GetVehicleType(self.handle) end function lib.vehicle:getPlate() return GetVehicleNumberPlateText(self.handle) end ---@param plate string function lib.vehicle:setPlate(plate) SetVehicleNumberPlateText(self.handle, plate) end function lib.vehicle:setOnGround() if lib.context == 'client' then return SetVehicleOnGroundProperly(self.handle) end self:setr('ox_entity_setonground', true) end