HRScripts Documentation
  • HRScripts Documentation
  • Resources
    • 📚HRLib
      • Classes
        • HRLibConfig
        • HRLibClientFPlayer
        • HRLibServerFPlayer
        • HRLibClientIPlayer
        • HRLibServerIPlayer
        • HRLibCloseIPlayer
        • HRLibCloseFPlayer
        • HRLibBlipOptions
        • HRLibBlipForCoordOptions
        • HRLibBlipForEntityOptions
        • HRLibBlipForAreaOptions
        • HRLibBlipForPickupOptions
        • HRLibInputDialogueTextOptions
        • HRLibVehicleProperties
      • Modules
        • Bridge
          • Shared
          • Client
          • Server
        • Callbacks
          • Shared
          • Client
          • Server
        • Closest
          • Client
        • Controls Disable
          • Client
        • CreateBlip
          • Client
        • DiscordMsg
          • Server
        • DoesIdExist
          • Shared
        • FPlayer
          • Shared
          • Client
          • Server
        • GetPedsInVehicle
          • Client
        • GetPedWeapons
          • Client
        • GetPlayers
          • Client
        • GetVehicleDoorStatus
          • Client
        • GetVehicleFromPlate
          • Client
        • Interface
          • Client
          • Server
        • IPlayer
          • Client
          • Server
        • PlayerIdentifiers
          • Server
        • RadomValueWithNoRepetition
          • Shared
        • RegCommand
          • Client
          • Server
        • Resource
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
    • HRGarages
      • Classes
        • HRGaragesConfig
        • HRGaragesVehicleInfo
        • HRGaragesClientFunctions
      • Exports
        • Server
    • 📦HRStorages
      • Exports
        • Client
        • Server
      • Callbacks
      • Commands
    • 🧹HRComserv
    • 🥷HRHostage
    • HRAdminMenu
      • Events
      • Exports
        • Client
        • Server
      • State Bags
    • ☑️HRWhitelist
    • HRExtraCommands
    • 🚦HRRealisticTraffic
    • 🗣️HRNPCDialogue
      • Classes
Powered by GitBook
On this page
  • OnRefresh
  • OnPlConnecting
  • OnPlJoining
  • OnPlDisc
  • StopMyself
  • OnServer
  1. Resources
  2. HRLib
  3. Modules
  4. Resource

Server

OnRefresh

Function to register a callback function into the event onResourceListRefresh's handler which is being triggered when the resource list is being refreshed

function HRLib.OnRefresh(cb: function)

Parameters description

  • cb - the callback function to add into the event's handler

OnPlConnecting

Function to add a callback function into the event playerConnecting's handler which is being triggered when a player starts connecting to the server

function HRLib.OnPlConnecting(
    cb: fun(
        source: integer,
        playerName: string,
        setKickReason: string,
        deferrals: table
    )
)

Parameters description

  • cb - the callback function to add into the event's handler

OnPlJoining

Function to add a callback function into the event playerJoining's handler which is being triggered when a player starts joining in the server (it's triggered when the player starts to load the loadingscreen)

function HRLib.OnPlJoining(cb: fun(source: integer))

Parameters description

  • cb - the callback function to add into the event's handler

OnPlDisc

Function to add a callback function into the event playerJoining's handler which is being triggered when a player disconnected from the server

function HRLib.OnPlJoining(cb: fun(source: integer, reason: string))

Parameters description

  • cb - the callback function to add into the event's handler

StopMyself

Function to stop the current resource (which is unavailable with the method StopResource(GetCurrentResourceName()))

function HRLib.StopMyself(msgtype: 'warn'|'error', msg: string)

Parameters description

  • msgtype - the type of the message reason

  • msg - the message reason

OnServer

PreviousSharedNextSpawnVehicle

Last updated 1 month ago

📚