Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • GameUtils

Index

Properties

mapBlip: { create: (config: MapBlip) => MapBlip; edit: (blipId: number, newConfig: MapBlip) => MapBlip; lists: {}; remove: (blipId: number) => void } = ...
description

Map Blip Functions

Type declaration

Methods

  • createFeedNotification(text: string, config?: { backgroundColor?: number }): void
  • createHelpNotification(text: string, config?: { beep?: boolean }): void
  • description

    Create help notification

    example
    createHelpNotification("Press ~INPUT_MOVE_UP_ONLY~ to Walk");
    

    Parameters

    • text: string
    • config: { beep?: boolean } = {}
      • Optional beep?: boolean

    Returns void

  • drawInstructionalButtons(buttonList: { controlId: number; controlType: number; message: string }[]): Promise<number>
  • drawText(text: string, config: { font?: number; size?: number; x: number; y: number }): void
  • description

    Draw text on screen

    variation
    example
    drawText("Your Server ID: 1", {
    x: 0.8,
    y: 0.85,
    font: 4,
    size: 0.6
    });

    Parameters

    • text: string
    • config: { font?: number; size?: number; x: number; y: number }
      • Optional font?: number
      • Optional size?: number
      • x: number
      • y: number

    Returns void

  • drawText3D(text: string, config: { colour: [number, number, number, number]; font?: number; size?: number; x: number; y: number; z: number }): void
  • description

    Draw 3D floating text

    variation
    example
    drawText3D("Press E to Pickup", {
    x: 0.8,
    y: 0.85,
    font: 4,
    size: 0.6,
    colour: [255,255,255,255]
    })

    Parameters

    • text: string
    • config: { colour: [number, number, number, number]; font?: number; size?: number; x: number; y: number; z: number }
      • colour: [number, number, number, number]
      • Optional font?: number
      • Optional size?: number
      • x: number
      • y: number
      • z: number

    Returns void

  • getCamDirection(): { x: number; y: number; z: number }
  • description

    Get the entity camera direction offset from axis X.

    example
    getCamDirection();
    

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

    • x: number
    • y: number
    • z: number
  • getCamTargetedCoords(distance: number): { x: number; y: number; z: number }
  • description

    Get the coordinates of the reflected entity/object the camera is aiming at

    example
    getCamTargetedCoords(6.0);
    

    Parameters

    • distance: number

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

    • x: number
    • y: number
    • z: number
  • getHashString(val: string): string
  • description

    Get hash value from the string

    example
    getHashString('Some Value');
    

    Parameters

    • val: string

    Returns string

  • getTargetedEntity(distance: number): { entityHit: number; x: number; y: number; z: number }
  • description

    Get entity the ped aimed at

    example
    getTargetedEntity(6.0);
    

    Parameters

    • distance: number

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

    • entityHit: number
    • x: number
    • y: number
    • z: number

Generated using TypeDoc