Info: Command processor - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Info: Command processor (
/showthread.php?tid=367407)
Info: Command processor -
Speed++ - 09.08.2012
Hello,
how to create a command processor ?.. example zcmd ecc
Re: Info: Command processor -
Kindred - 09.08.2012
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.
Re: Info: Command processor -
SnG.Scot_MisCuDI - 09.08.2012
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
Re: Info: Command processor -
AndreT - 09.08.2012
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.
AW: Info: Command processor -
Kwashiorkor - 09.08.2012
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
Re: Info: Command processor -
Speed++ - 09.08.2012
OK, Thanks