Dandnix Posted November 29, 2022 Share Posted November 29, 2022 ola existe alguma maneira de resumir isto: setAccountData(account, "color_r", r) setAccountData(account, "color_g", g) setAccountData(account, "color_b", b) resumir td para o mesmo item ex: setAccountData(account, "colors", r,g,b) Link to comment
Other Languages Moderators Lord Henry Posted November 30, 2022 Other Languages Moderators Share Posted November 30, 2022 -- Para salvar as cores na conta: local colors = toJSON({r, g, b}) -- Converte a tabela {r, g, b} numa string e salva essa string como accountData. setAccountData(account, "colors", colors) -- Para obter as cores da conta: local data = fromJSON(getAccountData(account, "colors")) -- Converte a string da tabela numa tabela normal. local r, g, b = unpack(data) 1 Link to comment
Recommended Posts