From 88ae9acb976a964038784f5d545acdc5399a77a9 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Fri, 16 Jun 2023 20:08:30 +1000 Subject: [PATCH] Update input.mdx --- pages/ox_lib/Modules/Interface/Client/input.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/ox_lib/Modules/Interface/Client/input.mdx b/pages/ox_lib/Modules/Interface/Client/input.mdx index c8f480ef..d4d354e6 100644 --- a/pages/ox_lib/Modules/Interface/Client/input.mdx +++ b/pages/ox_lib/Modules/Interface/Client/input.mdx @@ -247,11 +247,12 @@ local input = lib.inputDialog('Dialog title', { print(json.encode(input)) --- Getting r, g and b values from colour picker -local r, g, b = string.match(input[4], "rgb%((%d+), (%d+), (%d+)%)") +-- Getting rgbb values from colour picker +local rgb = lib.math.torgba(input[4]) --- Transforming unit date return to be used with Lua's os library -local date = input[5] / 1000 +-- Transforming date timestamp to a readable format with Lua's os library (server-only) +local timestamp = math.floor(input[5] / 1000) +local date = os.date('%Y-%m-%d %H:%M:%S', timestamp) ```