Jump to content

execute function


Recommended Posts

Posted

Is it possible to execute whole function with variables,loops etc in "execute command"(default admin panel),or is it only one command at a time?

If it is,it would be great to have some examples.

Posted

I believe it is, as admin uses runcode, which allows you to execute Lua code like any other resource.

So if I ran

function foo() outputChatBox("Someone is using runcode", root) end 

in runcode, then called 'foo()' after it or in another runcode command, it would output the message to all players.

I've seen people use runcode with loops and timers before. So basically anything you can do in a normal script, you can do in runcode. It's quite the handy tool.

Posted
I believe it is, as admin uses runcode, which allows you to execute Lua code like any other resource.

So if I ran

function foo() outputChatBox("Someone is using runcode", root) end 

in runcode, then called 'foo()' after it or in another runcode command, it would output the message to all players.

I've seen people use runcode with loops and timers before. So basically anything you can do in a normal script, you can do in runcode. It's quite the handy tool.

Got it,thank you

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...