ClosestFPlayer

Get the closest FPlayer to the given player/ped

Parameters description

ParameterTypeDescriptionDefault

Id

integer?

player server Id or ped or nil

current player

returnCloseFPlayers

boolean?

choose to receive all the close FPlayers

false

Return:

  • HRLibClientFPlayer? as closestFPlayer

  • HRLibCloseFPlayer[]? as closeFPlayers

Example

local closestFPlayer = HRLib.ClosestFPlayer()
HRLib.Notify('The closest FPlayer to you: '..json.encode(closestFPlayer, { indent = true }), 'success', 2500)

Last updated