Module core.plugins.stamina.sv_init

Stamina System.

Module Overview

Functions

PLUGIN.postPlayerSpawn(ply, light, changeTeam) Called when a player spawns, sets stamina to 100.
PLUGIN.keyPress(ply, key) Called to take stamina from jumping.
PLUGIN.playerTenthSecond(ply) Called to update a player's stamina.
PLUGIN.takeStamina(ply, amt) Function to take a player's stamina.

Functions

PLUGIN.postPlayerSpawn(ply, light, changeTeam)
Called when a player spawns, sets stamina to 100.

Parameters:

  • ply The player spawning.
  • light If the spawn is a lightspawn or a fullspawn.
  • changeTeam If the player is changing team.
PLUGIN.keyPress(ply, key)
Called to take stamina from jumping.

Parameters:

  • ply The player jumping.
  • key The key which was pressed.
PLUGIN.playerTenthSecond(ply)
Called to update a player's stamina. Deals with health based stamina, sprinting, vehicle stamina and noclipping.

Parameters:

  • ply The player to update.
PLUGIN.takeStamina(ply, amt)
Function to take a player's stamina.

Parameters:

  • ply The player to take stamina from.
  • amt The amount of stamina to take.