Battery System

Welcome to Battery System

Quasar Smartphone has a rechargeable battery system as long as you want to enable it in config.lua.

The battery will be depleted progressively, according to the configuration that we have set by default, and in case you want it, some apps may be heavier and drain your battery faster.

Powerbank

To recharge your battery we have an item called powerbank, which will allow you to use it and progressively increase the battery of your phone until it reaches 100%.

You can add the item in your database or qs-core to be able to sell it in a store or give it to a player

Administrator command

Admins will be able to give players battery with a simple configurable command in config_battery.lua, there you will be able to give permissions to certain types of admin and you can even configure the name of the command.

-- Usage /adminbattery id ammount
Config.AdminCommand = true -- Recharge the batery for admins?
Config.AdminCommandName = 'adminbattery'
Config.AdminCommandDescription = 'Recharge your battery like a elon musk'
Config.AdminPermissions = 'admin'

Export

If you want to use an export to get the player's battery from the client, you can use the following export

exports['qs-smartphone']:getBattery()

Last updated