Advertisement
Bolodefchoco_LUAXML

[Table] table.random

Jan 1st, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. --Creator: Bolodefchoco
  2. --Made in: 01/01/2016
  3. --Last update: 23/05/2016
  4. --[[ Notes:
  5.     Does:
  6.         Retorna um argumento aleatório da tabela inserida
  7.     Args:
  8.         t --> Tabela
  9. ]]--
  10.  
  11. table.random=function(t)
  12.     return (type(t)=="table" and t[math.random(#t)] or math.random())
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement