This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hook.Add( "HUDPaint", "DrawST2StaminaHUD", function() | |
local ply = LocalPlayer() | |
local stam = ply:GetStamina() | |
smoothStam = smoothStam or 100 | |
smoothStam = Lerp( 15 * FrameTime(), smoothStam, stam ) | |
surface.SetDrawColor( 0, 0, 0, 255 ) | |
surface.DrawRect( 20, ScrH() - 15, LocalPlayer():GetStaminaCap() * 3, 5 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Name: StringCleanse | |
Author: SweptThrone (sweptthr.one) | |
Description: Replaces non-typeable characters in a provided string with typeable versions. | |
Returns: The cleansed string, or the original string if no valid non-typeable characters were found. | |
Argument: The string to cleanse. | |
UPDATE January 17, 2022: Added some outliers in the 0x21## range. Manually. Also changed some decimals to hex. | |
*/ | |
function StringCleanse( str ) { |