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
  • getName
  • getJob
  • getMoney
  • setJob
  • setMoney
  • removeMoney
  1. Resources
  2. HRLib
  3. Modules
  4. Bridge

Server

getName

Function to get player's name in the game (not steam name)

function HRLib.bridge.getName(playerId: integer, nameType: 'firstname'|'lastname'?):
string? playerName

Parameters description

  • playerId - focused player's server Id

  • nameType - the name type, 'firstname', 'lastname' or nil for both with space between them

Return description

  • playerName - the player's name

getJob

Function to get player's job

function HRLib.bridge.getJob(playerId: integer, returnGrade: boolean?):
string? jobName,
integer? jobGrade

Parameters description

  • playerId - focused player's server Id

  • returnGrade - sets whether or not return grade of the player in its current job

Return description

  • jobName - the current player job's name

  • jobGrade - the current player job's grade (only available if returnGrade is true)

getMoney

Function to get player's money balance

function HRLib.bridge.getMoney(playerId: integer, account: 'cash'|'bank'):
integer? moneyBalance

Parameters description

  • playerId - focused player's server Id

  • account - the account to focus on getting the balance of

Return description

  • moneyAmount - the amount of money in the specified account

setJob

Function to set player's job and grade

function HRLib.bridge.setJob(playerId: integer, jobName: string, jobGrade: integer)

Parameters description

  • playerId - focused player's server Id

  • jobName - the job name

  • jobGrade - the job grade

setMoney

Function to set player's money balance in a specific account

function HRLib.bridge.setMoney(
    playerId: integer,
    account: 'cash'|'bank',
    amount: integer
)

Parameters description

  • playerId - focused player's server Id

  • account - the account to focus on setting the money balance

  • amount - the amount to set

removeMoney

Function to remove money from the current balance in the specified account

function HRLib.bridge.removeMoney(
    playerId: integer,
    account: 'cash'|'bank',
    amount: integer
)

Parameters description

  • playerId - focused player's server Id

  • account - the account to focus on removing money of

  • amount - the amount to remove from the balance

PreviousClientNextCallbacks

Last updated 1 month ago

📚