UNPKG

@overextended/ox_lib

Version:
23 lines (22 loc) 607 B
import { context } from '../..'; import { GameEntity } from '../Entity'; export class Vehicle extends GameEntity { constructor(handle) { super(); this.setHandle(handle); } getType() { return GetVehicleType(this.handle); } getPlate() { return GetVehicleNumberPlateText(this.handle); } setPlate(plate) { SetVehicleNumberPlateText(this.handle, plate); } setOnGround() { if (context === 'client') return SetVehicleOnGroundProperly(this.handle); return this.set('ox_entity_setonground', true, true); } }