INFINITYCORE FRAMEWORK
  • Getting started Infinity Core
  • INTRODUCTION
    • Framework FAQ
    • The World Map
    • Onesync & Txadmin
    • Chat/Vocal & Discord
    • Multi-Characters
    • Moonshiners DLC Remake
    • Performances
    • Zombies Population (add-on)
  • Roleplay Functions
    • Player commands
    • Admin commands
  • Global Functions
    • Player Datas
    • Notifications
    • Economy & jobs
    • Inventory
    • Levels & XP (RPG)
    • Functions Core
    • Permissions
    • Discord Sync API
    • DEBUG TOOLS
  • CORE TEAM & CREDITS
    • Official Team
    • Credits
Powered by GitBook
On this page
  • Round All values Func
  • Random Int Value Func
  • Get Player Current Town Position
  1. Global Functions

Functions Core

All Functions Availables

Round All values Func

RoundValues
-- client and serverside
tonumber(roundValue(CashSet, 2)) -- ex: 0.28$
tonumber(roundValue(GoldSet, 2)) -- ex: 1.22g
tonumber(roundValue(XpSet, 1))   -- ex: 100 XP
tonumber(roundValue(ItemQuantity, 1)) -- 1

-- The function prevent (1.5898789875725$) or -1 or wrong values showed and respect the decimal 0.00$ or decimal for gold 0.00g or int for xp 0xp

Random Int Value Func

Random Value with Integer

-- ClientSide
MyRandomInt = RandomInt(max)
-- return number 0 > your number

-- ServerSide
local MyRandomInt = exports.infinity_core:RandomInt(maxvalue)
-- return number 0 > your number

Get Player Current Town Position

Get Player Towns location
-- ClientSide Only
local MyCurrentTown = GetTownPlayer()
or    MyCurrentTown = exports.infinity_core:GetTownPlayer()Pos
-- return ex: Valentine
PreviousLevels & XP (RPG)NextPermissions

Last updated 1 month ago