Forum

> > CS2D > Scripts > Searching for a command processor.
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Searching for a command processor.

17 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Searching for a command processor.

Yates
Reviewer Off Offline

Zitieren
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.

alt Re: Searching for a command processor.

Yates
Reviewer Off Offline

Zitieren
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()

alt Re: Searching for a command processor.

Yates
Reviewer Off Offline

Zitieren

Thanks!

https://github.com/IvaWonderbush/Y.A.T.E.S/tree/development

Development branch is better

@user script favor:

• Command execution line 41
• Say hook (with checks) line 299

Should get you far enough for your own implementation.

@user VADemon: It's fine as long as you don't do or allow anything to do any weird things
1× editiert, zuletzt 15.02.18 11:37:08

alt Re: Searching for a command processor.

Gaios
Reviewer Off Offline

Zitieren
user script favor hat geschrieben
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 Datei existiert nicht (17457) also has good Command Processor, but the script isn't well written.

Spoiler >

alt Re: Searching for a command processor.

Yates
Reviewer Off Offline

Zitieren
user script favor hat geschrieben
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht