Console Input Plugin for Squirrel

ysc3839

  • VC:MP Beta Tester
  • Posts: 620
Console Input Plugin for Squirrel
« on March 14th, 2015, 05:25 AM »Last edited
Feature
Linux readline support.
In past version of this plugin, if you press arrow keys you will get characters like "^[[A^[[B^[[C^[[D".
Now with readline you can move the cursor or use command history.

Usage
Code: [Select]
function onConsoleInput(cmd, arg)
{
print(cmd + " " + arg);
}

Source & Download
https://bitbucket.org/ysc3839/0.4-cmdinput/downloads/

Version 1.3.1+ works on both v23(04rel004) and v30(04rel006) servers.

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,804
.

Sk

  • Jr. Member
  • Posts: 66

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,804
Re: Console Input Plugin
« Reply #3, on March 14th, 2015, 12:15 PM »
So, this happens once when you start the server? The server start-up is paused until the user inserts some text with something like std::cin and then it can proceed? Well, if your server has an auto-restart-on-crash protection then you might need to re-think your script.
.

ysc3839

  • VC:MP Beta Tester
  • Posts: 620
Re: Console Input Plugin
« Reply #4, on March 14th, 2015, 03:34 PM »
Quote from S.L.C on March 14th, 2015, 12:15 PM
So, this happens once when you start the server? The server start-up is paused until the user inserts some text with something like std::cin and then it can proceed? Well, if your server has an auto-restart-on-crash protection then you might need to re-think your script.
I don't know what you say. I use a thread to get user's input, and then use OnFrame to execute the script.

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,804
Re: Console Input Plugin
« Reply #5, on March 14th, 2015, 03:40 PM »
Quote from ysc3839 on March 14th, 2015, 03:34 PM
I don't know what you say. I use a thread to get user's input, and then use OnFrame to execute the script.
Why not just say that in the first place :-\ Every plugin deserves an introduction and not just: Download my plugin here...
.

Doom_Kill3R

  • VC:MP Beta Tester
  • Infinite loops defy infinity by overflowing memory
  • Posts: 1,107
Re: Console Input Plugin
« Reply #6, on March 14th, 2015, 03:51 PM »
FINALLY DAMN IT!

Atleast won't need to go ingame to test or execute a simple thing now... very helpful.

ysc3839

  • VC:MP Beta Tester
  • Posts: 620
Re: Console Input Plugin
« Reply #7, on March 15th, 2015, 02:29 AM »
Quote from S.L.C on March 14th, 2015, 03:40 PM
Quote from ysc3839 on March 14th, 2015, 03:34 PM
I don't know what you say. I use a thread to get user's input, and then use OnFrame to execute the script.
Why not just say that in the first place :-\ Every plugin deserves an introduction and not just: Download my plugin here...
There is the plugin source code. I don't want to say anything.

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,804
.

Fuzzie

  • Jr. Member
  • Posts: 83
Re: Console Input Plugin
« Reply #9, on March 15th, 2015, 10:43 AM »
Quote from S.L.C on March 15th, 2015, 10:14 AM
Quote from ysc3839 on March 15th, 2015, 02:29 AM
There is the plugin source code. I don't want to say anything.
Not anyone can read through C++ source code :-\
I agree with S.L.C. Provide a simple documentation about your plugin so that users can know what your plugin can do. How hard can that be?

Gudio

  • Full Member
  • Gudio.eu
  • Posts: 125
Re: Console Input Plugin
« Reply #10, on March 15th, 2015, 10:56 AM »
I see a lot of new people here, who haven't ever used 0.3zR2 squirrel server and onConsoleInput in their scripts, seriously. :)
Re: Console Input Plugin
« Reply #11, on March 15th, 2015, 11:26 AM »Last edited on March 15th, 2015, 11:32 AM
Feel free to PM me for Linux .so :P


ysc3839

  • VC:MP Beta Tester
  • Posts: 620
Re: Console Input Plugin
« Reply #12, on March 18th, 2015, 02:48 PM »
Quote from Gudio on March 15th, 2015, 11:26 AM
Feel free to PM me for Linux .so :P

I hope you can put the source code on internet! :)
BTW, Can you give me your plugin in the image? I think is useful!

jayant

  • Full Member
  • #MOMO-CS
  • Posts: 163
Re: Console Input Plugin
« Reply #13, on March 28th, 2015, 06:41 AM »
@ysc3839 - cmdinputrel32 isnt there in bitbucket.Please reupload. Thanks.

Gudio

  • Full Member
  • Gudio.eu
  • Posts: 125