Info: Command processor
#1

Hello,

how to create a command processor ?.. example zcmd ecc
Reply
#2

Don't expect us to tell you anything, creating includes takes experience.

Look through the damn include if you are really interested in finding out how to do it. Else you are going to die in a very deep hole after more replies commence.
Reply
#3

Honestly, if your going to have to ask how, you shouldnt be making one. Not saying its bad to ask because i would love to make a cmd processor too but it takes more knowledge then you think. And like he said, read through the include
Reply
#4

Additionally there's no need to create something that already exists. That would just be a waste of time. And zcmd by Zeex is already an excellent piece of work.

This is just something that most scriptwriters keep in mind. It is not evil to actually use the includes and useful scripts released on the forum. If necessary and your experience allows, you can modify them to your needs, sure.
Reply
#5

its just about tokenizing a given string (for example cmdtext[] in OnPlayerCommandText or text[] in OnPlayerText). mostly you have a format like:
character to identify that the string contains a "command" (mostly '/')
commandname
parameters (optional)
for example you are given the string "/hello world 42" -> tokenize it (commandname -> "hello 42", parameters -> "world 42"). there are some ways to seperate commands eg use of CallLocalFunction because its quite flexible and tidy. the content is quite easy but it depends on you how to handle it
Reply
#6

OK, Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)