Skip to content

erroris3/errorism.time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Authors

Time Utils

just a simple script that store onlinetime and custom time that you want easier.

Features

  • Online Time Tracker
  • Exports for easy access

Requirement

API Reference [Serverside]

Get time record without plus from database (airtime).

exports['errorism.time']:getCurrent(index,identifier)
Parameter Type Description
index string Required. Index of time record
identifier string Required. Identifier of player

Get time record.

exports['errorism.time']:get(index,identifier,onDatabase)
Parameter Type Description
index string Required. Index of time record
identifier string Required. Identifier of player
onDatabase boolean Plus time from database

Start custom time record.

exports['errorism.time']:start(index,identifier)
Parameter Type Description
index string Required. Index of time record
identifier string Required. Identifier of player

Stop custom time record and return the result.

exports['errorism.time']:stop(index,identifier,save)
Parameter Type Description
index string Required. Index of time record
identifier string Required. Identifier of player
save boolean Save on database?
return int Time result in milliseconds (airtime if not save)

Usage/Examples

local xPlayer = ESX.GetPlayerFromId(source)
local identifier = xPlayer.getIdentifier()
local onlineTime = exports['errorism.time']:get('online',identifier,true)
print(onlineTime)
-- Output : 123123
exports['errorism.time']:start('test',identifier)
Wait(3000)
local time = exports['errorism.time']:stop('test',identifier,true)
print(time)
-- Output : 3000

Tech Stack

Server: lua

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages