ClosestIPlayer

Get the nearest IPlayer to the given ped/player

Parameters description

Parameter
Type
Description
Default

Id

integer?

player server Id or ped or nil

current player

returnCloseIPlayers

boolean?

choose to receive all the close IPlayers

false

Return:

  • HRLibClientIPlayer? closestIPlayer

  • HRLibCloseIPlayer[]? closeIPlayers

Example

local closestIPlayer = HRLib.ClosestIPlayer()
HRLib.Notify('The closest IPlayer to you: '..json.encode(closestIPlayer, { indent = true }), 'success', 2500)

Last updated