[PAID] [QBCore] KOKO-CHARGEIT

A script by KOKOROG

No reviews yet.
[PAID] [QBCore] KOKO-CHARGEIT main image

Full Description

This resource is encrypted with FiveM escrow

After purchase you can access the script at https://keymaster.fivem.net/asset-grants

You can buy it on Tebex – Just 7 euro

Preview Video

Features

Fully customizable resource using QBCore based framework

Players can interact with charging stations placed around the map to charge their phones.

When near a charging station, players can press a specified key (e.g., “E”) to start the charging process.

Players will be able to check their phone’s current battery percentage through qb-phone ui.

The phone’s battery percentage will gradually decrease over time when it’s being in player, simulating battery usage.

If the phone’s battery reaches 0%, the phone will cant turn on until it is charged again.

Dependencies

QBCore based framework (you can change to your core from config.lua like qb-, IF- or the way your core is maded) - IT HAVE TO BE A QBCore BASED OR SMILLAR

Any notification resource (you can edit it from config)

qb-phone or alternative that is editable

The Config.lua

Config = {}

Config.Core = 'qb-core'
Config.Interval = 10000 -- in 10 seconds the battery will drop by 1%
Config.Charging = 1000 -- in 1 seconds while charging a 1% will be added
Config.Price = 100 -- price of the charging
Config.Input = 38 -- button to charge the phone
Config.log = true -- Checks the script name to avoid errors

Config.Locations = {
    {pos = vector3(-1521.94, -407.37, 35.59), text = "Press E to charge your phone", text2 = "ChargeIt", icon = 354}--,
    --{pos = vector3(-1525.17, -414.56, 35.59), text = "Press E to charge your phone", text2 = "ChargeIt", icon = 354}
}

Config.Text = "Press E to get your charged phone"


function ShowNotification(msg, type)
    local QBCore = exports[Config.Core]:GetCoreObject() -- dont change QBCore as it will break the script
    QBCore.Functions.Notify(msg, type) -- -- dont change IFCore as it will break the script
    
    --exports['okokNotify']:Alert("ChargePhone", msg, 5000, type) 
    -- you can change that to your own CLIENT SIDE (can be export)
end

function ShowNotificationServer(source, msg, type)
 --TriggerClientEvent('okokNotify:Alert', source, "ChargePhone", msg, 5000, type)
    TriggerClientEvent('QBCore:Notify', source, msg, type)
 -- you can change that to your own CLIENT SIDE (can't be export)
 end

 

In the script folder, you will find a readme.md file that provides detailed instructions for editing the qb-phone and setting up the SQL database.

Code is accessible No
Subscription-based No
Lines (approximately) 550
Requirements qb-core/qb-phone
Support Yes via discord

Config Merger
Have you tried Config Merger? Merge your configs easily