Server

GetFPlayer

Function to get FPlayer's methods for the given player's server Id

function HRLib.GetFPlayer(playerId: integer): HRLibServerFPlayer

Parameters description

  • playerId - the player server Id to focus on

AllFPlayers

Function to get FPlayer's methods for all players in the server

function HRLib.AllFPlayers(): HRLibServerFPlayer[]?

Notify

Function to send notification to the focused player with HRLib's notification system

function FPlayer:Notify(
    description: string,
    type: 'success'|'error'|'info'|'warning',
    duration: number?,
    pos: 'top-right'|'center-right'|'bottom-right'|
    'frombelow-right'|'top-left'|'left-center'|'frombelow-left'?,
    sound: boolean?
)

Parameters description

  • description - the notification's content

  • type - the notification type

  • duration - the notification duration (default is 2500, in msec)

  • pos - the notification position on the screen (default is found in HRLib's config)

  • sound - sets whether or not the sound should be played (default is true)

FocusedEvent

Function to trigger a client event for the focused player

function FPlayer:FocusedEvent(eventName: string, ...: any)

Parameters description

  • eventName - the event name

  • ... - the event's parameters

Last updated