Camera <BadgeClient/>
Camera module is a specialized tool for manipulating the camera in RedM.
alias
The module has two alias:
jo.camforjo.camerajo.freecamforjo.camera.freeCamera
JO Functions > jo.camera.freeCamera.getCam()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.getCam -->
A function to get the freecam camera <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.getCam -->
JO Functions > jo.camera.freeCamera.getCam() > Syntax
jo.camera.freeCamera.getCam()
JO Functions > jo.camera.freeCamera.getCam() > Return Value
Type : integer
The camera id
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.getCam -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.getCam -->
JO Functions > jo.camera.freeCamera.getPromptGroup()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.getPromptGroup -->
A function to get the freecam prompt group <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.getPromptGroup -->
JO Functions > jo.camera.freeCamera.getPromptGroup() > Syntax
jo.camera.freeCamera.getPromptGroup()
JO Functions > jo.camera.freeCamera.getPromptGroup() > Return Value
Type : string
The prompt group name
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.getPromptGroup -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.getPromptGroup -->
JO Functions > jo.camera.freeCamera.isActive()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.isActive -->
A function to check if the freecam is active <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.isActive -->
JO Functions > jo.camera.freeCamera.isActive() > Syntax
jo.camera.freeCamera.isActive()
JO Functions > jo.camera.freeCamera.isActive() > Return Value
Type : boolean
Whether the freecam is active
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.isActive -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.isActive -->
JO Functions > jo.camera.freeCamera.isLocked()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.isLocked -->
A function to check if the freecam rotation is locked <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.isLocked -->
JO Functions > jo.camera.freeCamera.isLocked() > Syntax
jo.camera.freeCamera.isLocked()
JO Functions > jo.camera.freeCamera.isLocked() > Return Value
Type : boolean
Whether the freecam rotation is locked
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.isLocked -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.isLocked -->
JO Functions > jo.camera.freeCamera.lockRotate()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.lockRotate -->
A function to lock the freecam rotation <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.lockRotate -->
JO Functions > jo.camera.freeCamera.lockRotate() > Syntax
jo.camera.freeCamera.lockRotate()
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.lockRotate -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.lockRotate -->
JO Functions > jo.camera.freeCamera.start()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.start -->
A function to start the freecam <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.start -->
JO Functions > jo.camera.freeCamera.start() > Syntax
jo.camera.freeCamera.start(options)
JO Functions > jo.camera.freeCamera.start() > Parameters
options : table <BadgeOptional />
The freecam option options
options.interpolate: number - The interpolate time - default0
options.showPrompts: boolean - Whether to show prompts - defaulttrue
options.range: number - The range of the freecam - default10000
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.start -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.start -->
JO Functions > jo.camera.freeCamera.stop()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.stop -->
A function to stop the free camera <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.stop -->
JO Functions > jo.camera.freeCamera.stop() > Syntax
jo.camera.freeCamera.stop()
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.stop -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.stop -->
JO Functions > jo.camera.freeCamera.unlockRotate()
<!-- @include: ./slots/headers.md#client|jo.camera.freeCamera.unlockRotate -->
A function to unlock the freecam rotation <br>
<!-- @include: ./slots/descriptions.md#client|jo.camera.freeCamera.unlockRotate -->
JO Functions > jo.camera.freeCamera.unlockRotate() > Syntax
jo.camera.freeCamera.unlockRotate()
<!-- @include: ./slots/examples.md#client|jo.camera.freeCamera.unlockRotate -->
<!-- @include: ./slots/footers.md#client|jo.camera.freeCamera.unlockRotate -->