Files

> > CS2D > Lua Scripts > Command Processor
Files overviewCS2D overviewLua Scripts overview

English Command Processor >

5 comments771 b, 492 Downloads

old Command Processor

MikuAuahDark
User Off Offline

> Data:
• Hooks: cs2d lua hook say
• Lines: 36
• LUAFunction Used: setmetatable, pairs, unpack
• Reserved Variable: SHOW_MESSAGE_WHEN_CMD_NOT_FOUND, CommandProcessor, COMMAND, CMD
> Description: This lua allow you to add command easily by creating a function of the commands without editing many code on the CommandProcessor.lua itself
> How To Install: you all know it right
> How To Configure: open CommandProcessor.lua with any text editor, and you can edit variable SHOW_MESSAGE_WHEN_CMD_NOT_FOUND true/false. true by default
> How To Add Commands:
• you can create a command by just simply creating it's function.
• Example:
1
2
3
function CMD:commandname(id,argument1,arg2,...)
	msg2(id,"©000255000"..id.." "..argument1.." "..arg2.." "..table.concat({...}," "))
end
• code above add a command "commandname", to call the command, all you need is say !commandname <arguments> and it would call CMD:commandname

> Notes:
• You also can use COMMAND:commandname instead of CMD:commandname or CMD.commandname, it would do same.
Approved by Seekay

Download Download

771 b, 492 Downloads

Comments

5 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Avo
User Off Offline

I prefer TLEx.

@Gajos, you´re thanking, becouse he used lua´s syntax sugar. Strange.

Spoiler >
edited 1×, last 11.04.13 05:53:28 pm

old

mafia_man
User Off Offline

Not enough for like.

old

Gajos
BANNED Off Offline

thank you for using " : " I need it
I like it!

old

Deathliger
User Off Offline

very useful lua for people that tired making tons of codes just for command system
I like it!
edited 1×, last 19.04.17 02:27:42 pm
To the start Previous 1 Next To the start