💜
Sakura
  • 👋Welcome
  • Information
    • 🎯Quick start
    • ⚜️Common knowledge
    • 💾Examples
      • *️Rendering menus, windows
  • documentation
    • 🪝Hooks
    • ⚙️Variables
      • 🍎Weapon ids
      • 🍎Inputs
      • 🍎Keys
      • 🍎Flags
      • 🍎ImGui Window Flags
    • 📛Namespaces
      • 🍏Game
      • 🍏ImGui (Menu)
      • 🍏Render
      • 🍏Local Player
      • 🍏Player
      • 🍏Notify
Powered by GitBook
On this page
  1. documentation
  2. Namespaces

Player

Contains all functions from Local player namespace.

-- This Lua code calls the "GetTeam" function of the "Player" module, which takes a player index as input parameter.
-- Parameters:
--     index: integer
-- Returns:
--     team as an integer. (1 = tt | 2 = ct)
Player.GetTeam(index)
-- Returns the origin (position) of the player with the specified index.
-- Parameters:
--     index: integer value representing the index of the player to get the origin of.
-- Returns:
--     A vector containing the x, y, and z coordinates of the player's origin.
Player.GetOrigin(index)
-- This function takes an index of a player and returns the player's name as a string.
-- Parameters:
--     index: The index of the player (a number)
-- Returns:
--     The name of the player (a string)
Player.GetName(index)
-- This function returns the model name of a player specified by their index.
-- Parameters:
--     index: the index of the player
-- Returns:
--     the model name of the player as a string
Player.GetModelName(index)
-- This function returns the distance between the local player and the player with the given index in the game.
-- Parameters:
--     index: the index of the player
-- Returns:
--     the integer as a length
Player.GetDistance(index)
-- This function returns the actual distance between the local player and the player with the given index in the game.
-- Parameters:
--     index: the index of the player
-- Returns:
--     the float as a length
Player.GetActualDistance(index)
-- This function returns the ping of the player with the given index in the game.
-- Parameters:
--     index: the index of the player
-- Returns:
--     the integer as a ping
Player.GetPing(index)
-- This function returns true if player is alive.
-- Parameters:
--     index: the index of the player
-- Returns:
--     true if player is alive, false otherwise.
Player.IsAlive(index)
PreviousLocal PlayerNextNotify

Last updated 2 years ago

📛
🍏