Forum

> > CS2D > Scripts > Searching for a command processor.
Forums overviewCS2D overview Scripts overviewLog in to reply

English Searching for a command processor.

17 replies
To the start Previous 1 Next To the start

old Re: Searching for a command processor.

Yates
Reviewer Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
commands = {}

function commands.help()
    msg("ayyy")
end

local command = "help"

func = loadstring("commands."..command.."()")
func()

That's all you need. Probably works, didn't test it.

old Re: Searching for a command processor.

Yates
Reviewer Off Offline

Quote
Just copy lines 3 to 5 then rename
help
to whatever you want and change the local
command
parameter to the same thing.

Example:

1
2
3
4
5
6
7
8
9
10
commands = {}

function commands.thisisashittyfunction()
    msg("hey look at me")
end

local command = "thisisashittyfunction"

func = loadstring("commands."..command.."()")
func()

old Re: Searching for a command processor.

Gaios
Reviewer Off Offline

Quote
user script favor has written
I'm searching for command processor and adding my own commands on , so you will do a big favor for me.

Command Processor = Admin Script..

This is your solution
> https://github.com/IvaWonderbush/Y.A.T.E.S/tree/development



Anyway file File does not exist (17457) also has good Command Processor, but the script isn't well written.

Spoiler >

old Re: Searching for a command processor.

Yates
Reviewer Off Offline

Quote
user script favor has written
I don't need admin script at the moment , i created my own so.

If you click on both links you'll see my implementation of processing commands, you can just copy parts of it to your own script. You don't need to use the whole thing if you don't want to.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview