Player
Provides utility functions for retrieving player information, directional logic, entity targeting, animations, and more.
Accessing the Module
Shared
get_cardinal_direction(player_ped)
Returns the cardinal direction the player is facing.
Parameters
player_ped
number
The player ped (use PlayerPedId()
or GetPlayerPed(source)
)
Example
get_distance_to_entity(player, entity)
Calculates the distance between a player and another entity.
Parameters
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
player_ped
number
The player ped
Example
get_region(player_ped)
Returns the name of the region the player is located in.
Parameters
player_ped
number
The player ped
Example
get_player_details(player_ped)
Returns a table with extended player stats and data.
Parameters
player_ped
number
The player ped
Example
get_target_entity(player_ped)
Returns the entity a player is currently aiming at.
Parameters
player_ped
number
The player ped
Example
play_animation(player_ped, options, callback)
Plays an animation with optional props and visual progress.
Parameters
player_ped
number
The player ped
options
table
Animation and prop options
callback
function
Function called after animation
Example
Last updated