Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

[LB SERIES] RunRunRun by Yonderboi


  • Please log in to reply
1 reply to this topic

#1
Maxxxel

Maxxxel

    The One

  • Scripts Developer
  • 1,087 posts
  • LocationGuess the right City to win 10$

Simple lib by Yonderboi with many useful functions.

I have the rights to publish it here.

 

The following functions exist:

-- Functions
run_once(fn, args) --runs the the function "fn" ONE time
run_many(count, fn, args) --runs the function "fn" "count" TIMES
run_every(interval, fn, args) --runs the function "fn" EVERY "interval" seconds
run_later(seconds, fn, args) --runs the function "fn" ONE time in "seconds" seconds
run_at(clock, fn, args) --runs the function "fn" ONE time at "clock"(Game Time in seconds + Ping) 
run_until(fn, args) --run fn until it returns true
run_while(fn, args) --run fn until untilfn returns true
run_until2(untilfn, fn, args) --run fn until untilfn returns true
run_while2(whilefn, fn, args) --run fn while whilefn returns true
run_check(fn, args) --if args are passed, then they are used in latest fn-call, else original args are used

-- Resets
run_many_reset(count, fn, args)
run_every_reset(interval, fn, args)
run_later_reset(seconds, fn, args)
run_at_reset(clock, fn, args)
run_until_reset(fn, args)
run_while_reset(fn, args)
run_until2_reset(untilfn, fn, args)
run_while2_reset(whilefn, fn, args)
        

Download: https://github.com/M...y/runrunrun.lua

Note: Fn = function not function(), f.e. run_once(print("Hi") better do: run_once(print, "Hi")


  • 1

#2
CptZeyx

CptZeyx

    Henry

  • Banned
  • PipPipPip
  • 784 posts
  • LocationBetween here and there
Oh really useful ^_^ will use it
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users