Garry's Mod Wiki

system.BatteryPower

  number system.BatteryPower()

Description

Returns the current battery power.

Returns

1 number
0-100 if a battery (laptop, UPS, etc) is present.

Will instead return 255 if plugged in without a battery.