For the complete documentation index, see llms.txt. This page is also available as Markdown.

Player

Provides utility functions for retrieving player information, directional logic, entity targeting, animations, and more.


Accessing the Module

local PLAYER <const> = exports.boii_utils:get("modules.player")

Shared

get_cardinal_direction(player_ped)

Returns the cardinal direction the player is facing.

Parameters

Name
Type
Description

player_ped

number

The player ped (use PlayerPedId() or GetPlayerPed(source))

Example

local dir = PLAYER.get_cardinal_direction(PlayerPedId())

get_distance_to_entity(player, entity)

Calculates the distance between a player and another entity.

Parameters

Name
Type
Description

player

number

The player entity

entity

number

The target entity (or net ID)

Example


Client

get_street_name(player_ped)

Gets the current street and area the player is in.

Parameters

Name
Type
Description

player_ped

number

The player ped

Example


get_region(player_ped)

Returns the name of the region the player is located in.

Parameters

Name
Type
Description

player_ped

number

The player ped

Example


get_player_details(player_ped)

Returns a table with extended player stats and data.

Parameters

Name
Type
Description

player_ped

number

The player ped

Example


get_target_entity(player_ped)

Returns the entity a player is currently aiming at.

Parameters

Name
Type
Description

player_ped

number

The player ped

Example


play_animation(player_ped, options, callback)

Plays an animation with optional props and visual progress.

Parameters

Name
Type
Description

player_ped

number

The player ped

options

table

Animation and prop options

callback

function

Function called after animation

Example

Last updated