@overextended/ox_core
Version:
A modern FiveM framework.
44 lines (43 loc) • 1.94 kB
TypeScript
import { ClassInterface } from 'classInterface';
import { VehicleProperties } from '@overextended/ox_lib';
import type { Dict, VehicleData } from '../../types';
import { Vector3 } from '@nativewrappers/server';
export declare class OxVehicle extends ClassInterface {
#private;
entity: number;
netId: number;
script: string;
plate: string;
model: string;
make: string;
id?: number;
vin?: string;
owner?: number;
group?: string;
protected static members: Dict<OxVehicle>;
protected static keys: Dict<Dict<OxVehicle>>;
static spawn(model: string, coords: Vector3, heading?: number): number;
static get(entityId: string | number): OxVehicle;
static getFromVehicleId(vehicleId: number): OxVehicle;
static getFromNetId(id: number): OxVehicle;
static getFromVin(vin: string): OxVehicle;
static getAll(): Dict<OxVehicle>;
static generateVin({ make, name }: VehicleData): Promise<string>;
static generatePlate(): Promise<string>;
static saveAll(resource?: string): void;
constructor(entity: number, script: string, plate: string, model: string, make: string, stored: string | null, metadata: Dict<any>, properties: VehicleProperties, id?: number, vin?: string, owner?: number, group?: string);
set(key: string, value: any): void;
get(key: string): any;
getState(): StateBagInterface;
getStored(): string | null;
getProperties(): VehicleProperties;
save(): Promise<number> | Promise<import("mariadb").UpsertResult | import("mariadb").UpsertResult[]> | undefined;
despawn(save?: boolean): void;
delete(): void;
setStored(value: string | null, despawn?: boolean): void;
setOwner(charId?: number): void;
setGroup(group?: string): void;
setPlate(plate: string): void;
setProperties(properties: VehicleProperties, apply?: boolean): void;
respawn(coords?: Vector3, rotation?: Vector3): Promise<void>;
}