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
        • Resources
          • Shared
          • Server
        • SpawnVehicle
          • Shared
        • Streaming
          • Client
        • string
          • Shared
        • table
          • Shared
        • ToVector
          • Shared
        • TrackingEntities
          • Client
            • Functions
            • Events
        • Values
          • Shared
          • Client
        • VehicleProperties
          • Client
          • Server
        • SetDefaultPedVariation
          • Shared
        • GetServerInfo
          • Server
    • 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
  • Teleport
  • SpawnVehicle
  • SetHealth
  • SetInvincibility
  1. Resources
  2. HRLib
  3. Modules
  4. FPlayer

Shared

Teleport

Function to teleport the focused player only with given coords

function FPlayer:Teleport(coords: vector3)

Parameters description

  • coords - the coordinates to use when teleporting the player

SpawnVehicle

Function to spawn a vehicle with specific vehicle model and the option to spawn the player inside the vehicle

function FPlayer:SpawnVehicle(
    vehModel: string|integer,
    spawnPlayerInside: boolean?,
    saveVehicle: boolean?
): integer vehicle

Parameters description

  • vehModel - the vehicle model in string or hash format

  • spawnPlayerInside - sets whether or not spawn the player in

  • saveVehicle - sets whether or not save the vehicle, the player is currently in if it's in any vehicle

Return description

  • vehicle - the entityId of the spawned vehicle

SetHealth

Function to set the health of the focused player

function FPlayer:SetHealth(health: number?)

Parameters description

  • health - the health to set (if nil, it will heal the player with the maximum health for its ped)

SetInvincibility

Function to toggle focused player's invincibility

function FPlayer:SetInvincibility(toggle: boolean?)

Parameters description

  • toggle - sets whether or not the player is invincible

PreviousFPlayerNextClient

Last updated 1 month ago

📚