Camera

Helpful camera tools for controlling the GTA camera system

Client Module - This can only be used on the client

lib.camera.focusEntity

Quickly focus a camera towards an entity

lib.camera.focusEntity(entity, data)
Parameter TypeRequiredDescription

entity

Number

Entity to focus

data

Object

Camera options, refer to Data Structure

lib.camera.focusHead

Focus onto a ped's head with the camera, great for menus

lib.callback.focusHead(entity, data)
Parameter TypeRequiredDescription

event

String

Entity to focus

data

Object

Camera options, refer to Data Structure

lib.camera.focusPoint

Focus onto a specific position with the camera

lib.callback.focusPoint(data)
Parameter TypeRequiredDescription

data

Object

Camera options, refer to Data Structure

lib.camera.exit

Leave active camera

lib.callback.exit()

Data Structure

This is the data structure of a camera and the valid options

TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC TBC

{
    -- Required
    "pos": vector2(150.0, 100.0),    -- Used as the location on the map
    "name": "Example Blip",          -- Label displayed on the map key
    "sprite": 1,                     -- Sprite to be displayed
    "display": 4,                    -- Display options
    "scale": 1.0,                    -- Size of the blip
    "color": 1,                      -- Color of the blip
    -- Not Required
    "shortRange": false,             -- Is the blip short range
    "category": 1,                   -- Category of the blip
    "alpha": 255,                    -- Alpha (opacity) of the blip
    "rotation": 0,                   -- Rotation
    "route": false,                  -- Should the blip be routed to
    "canSee": function()             -- Should the blip render
        return true
    end,                  
}

Last updated