Garry's Mod Wiki

Revision Difference

system.BatteryPower#527573

<function name="BatteryPower" parent="system" type="libraryfunc"> <description>Returns the current battery power.</description> <realm>Shared and Menu</realm> <rets> <ret name="" type="number">0-100 if on battery power. ⤶ If plugged in, the value will be 255 regardless of charging state.</ret> <ret name="" type="number">0-100 if a battery (laptop, UPS, etc) is present. ⤶ Will instead return 255 if plugged in without a battery.</ret> </rets> </function>