Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Game

Index

Properties

entity: { getCoords: (entity?: number) => { heading: number; x: number; y: number; z: number } } = ...
description

Only work on an entity (Ped, Player, Vehicle, Object, etc)

Type declaration

  • getCoords: (entity?: number) => { heading: number; x: number; y: number; z: number }
      • (entity?: number): { heading: number; x: number; y: number; z: number }
      • description

        Get coordinates of an entity

        example
        getCoords(PlayerPedId());
        

        Parameters

        • entity: number = ...

          Entity

        Returns { heading: number; x: number; y: number; z: number }

        • heading: number
        • x: number
        • y: number
        • z: number
ped: { getCurrentVehicle: (ped?: number, isDriver?: boolean) => number | false; teleportToCoordinates: (ped?: number, coords: { x: string | number; y: string | number; z: string | number }) => boolean; teleportToMarker: (ped?: number) => Promise<boolean> } = ...
description

Only work for a ped (Pedestrian, Player)

Type declaration

  • getCurrentVehicle: (ped?: number, isDriver?: boolean) => number | false
      • (ped?: number, isDriver?: boolean): number | false
      • description

        Get current vehicle of a ped

        example
        getCurrentVehicle(PlayerPedId(), false);
        

        Parameters

        • ped: number = ...

          Ped

        • isDriver: boolean = false

          If set to true, it will return false if the player is in the vehicle not as a driver.

        Returns number | false

  • teleportToCoordinates: (ped?: number, coords: { x: string | number; y: string | number; z: string | number }) => boolean
      • (ped?: number, coords: { x: string | number; y: string | number; z: string | number }): boolean
      • description

        Teleport to a coordinates

        example
        teleportToCoordinates(PlayerPedId(), { 1000, 2000, 500 });
        

        Parameters

        • ped: number = ...

          Ped

        • coords: { x: string | number; y: string | number; z: string | number }

          Coordinate of the location

          • x: string | number
          • y: string | number
          • z: string | number

        Returns boolean

  • teleportToMarker: (ped?: number) => Promise<boolean>
      • description

        Teleport to a waypoint marker set on the map

        example
        teleportToMarker(PlayerPedId());
        

        Parameters

        • ped: number = ...

          Ped

        Returns Promise<boolean>

player: { getNearestOneFrom: (entity: number, radius: number) => Promise<any[]>; getNearestOneIn: (coords: { radius?: number; x: number; y: number; z: number }) => Promise<any[]>; setNoClip: (speed?: number) => Promise<boolean> } = ...
description

Only work for an active player

Type declaration

  • getNearestOneFrom: (entity: number, radius: number) => Promise<any[]>
      • (entity: number, radius: number): Promise<any[]>
      • description

        Get a closest player near an entity (Ped, Object, etc).

        example
        getNearestOneFrom(PlayerPedId());
        

        Parameters

        • entity: number

          Entity (Ped, Object, etc).

        • radius: number

        Returns Promise<any[]>

  • getNearestOneIn: (coords: { radius?: number; x: number; y: number; z: number }) => Promise<any[]>
      • (coords: { radius?: number; x: number; y: number; z: number }): Promise<any[]>
      • description

        Get Nearest player from a coords. Returning list of player ids if found.

        example
        getNearestOneIn({ 100, 300, 400, 5.0 });
        

        Parameters

        • coords: { radius?: number; x: number; y: number; z: number }
          • Optional radius?: number
          • x: number
          • y: number
          • z: number

        Returns Promise<any[]>

  • setNoClip: (speed?: number) => Promise<boolean>
      • description

        Set a local player to disable collision.

        example
        setNoClip(PlayerPedId());
        

        Parameters

        • speed: number = 2

        Returns Promise<boolean>

vehicle: { delete: (vehicle: number) => boolean; getNearestOneFrom: (entity: number, radius?: number) => number | false; getNearestOneIn: (coords: { radius?: number; x: number; y: number; z: number }) => number | false; spawn: (model: string, coords?: { heading?: number; x: number; y: number; z: number }) => Promise<boolean> } = ...
description

Only work with vehicles

Type declaration

  • delete: (vehicle: number) => boolean
      • (vehicle: number): boolean
      • description

        Delete vehicle

        example
        delete(1024);
        

        Parameters

        • vehicle: number

        Returns boolean

  • getNearestOneFrom: (entity: number, radius?: number) => number | false
      • (entity: number, radius?: number): number | false
      • description

        Get a closest vehicle near an entity (Ped, Object, etc).

        example
        getNearestOneFrom(PlayerPedId());
        

        Parameters

        • entity: number

          Entity (Ped, Object, etc).

        • Optional radius: number

        Returns number | false

  • getNearestOneIn: (coords: { radius?: number; x: number; y: number; z: number }) => number | false
      • (coords: { radius?: number; x: number; y: number; z: number }): number | false
      • description

        Get a closest vehicle near a coordinate

        example
        getNearestOneIn({ 1000, 5000, 300, 5.0 });
        

        Parameters

        • coords: { radius?: number; x: number; y: number; z: number }

          Coordinate of the location to find vehicle

          • Optional radius?: number
          • x: number
          • y: number
          • z: number

        Returns number | false

  • spawn: (model: string, coords?: { heading?: number; x: number; y: number; z: number }) => Promise<boolean>
      • (model: string, coords?: { heading?: number; x: number; y: number; z: number }): Promise<boolean>
      • description

        Spawn a vehicle based on its model name

        example
        spawn('zentorno', { 1000, 5000, 500, 50 })
        

        Parameters

        • model: string

          Vehicle Model Name

        • coords: { heading?: number; x: number; y: number; z: number } = ...

          Coordinate of the location to spawn

          • Optional heading?: number
          • x: number
          • y: number
          • z: number

        Returns Promise<boolean>

Methods

  • disableDispatchService(): void
  • description

    Disable default game dispatch radio

    example
    disableDispatchService();
    

    Returns void

  • optimizeFPS(ped?: number): void
  • description

    Basically optimizing texture and things in GTA, such as clearing blood, wetness, dirt, etc. in ped

    example
    optimizeFPS(PlayerPedId());
    

    Parameters

    • ped: number = ...

      Ped

    Returns void

  • resetWantedLevel(playerId?: number): boolean
  • description

    Reset wanted level for a player

    example
    resetWantedLevel(PlayerId());
    

    Parameters

    • playerId: number = ...

      Player Ped

    Returns boolean

Generated using TypeDoc