How to make a vcmp plugin. Not asking to give me whole code. Just need directions and needs to requirements and the language to use. Rest, I will do it.
This link will help you.
https://wiki.vc-mp.org/wiki/Introduction_to_the_Plugin_SDK
Quote from: Sk on Jun 11, 2018, 12:10 PMThis link will help you.
https://wiki.vc-mp.org/wiki/Introduction_to_the_Plugin_SDK
Thanks for the help. Btw I am still confused about the language.
Plugins are written in C. If you don't understand it, you either need to learn it or stick with the language plugins that already exist.
Out of curiosity, what functionality are you trying to add by writing a plugin?
Quote from: Stormeus on Jun 13, 2018, 12:02 AMPlugins are written in C. If you don't understand it, you either need to learn it or stick with the language plugins that already exist.
Out of curiosity, what functionality are you trying to add by writing a plugin?
There are many function I want to add. One of them is auto-record a video in server-side.
Quote from: umar4911 on Jun 13, 2018, 07:08 AMQuote from: Stormeus on Jun 13, 2018, 12:02 AMPlugins are written in C. If you don't understand it, you either need to learn it or stick with the language plugins that already exist.
Out of curiosity, what functionality are you trying to add by writing a plugin?
There are many function I want to add. One of them is auto-record a video in server-side.
That is not possible by a plugin, basically, most of the things you can do already come with the squirrel plugin.
If auto record is not available then I want to script a plugin when sent a command to it, it closes an application running in the server's background(not client).
Quote from: umar4911 on Jun 13, 2018, 07:08 AMThere are many function I want to add. One of them is auto-record a video in server-side.
From what source? I mean, what gives(streams?) you the video data to the server. And what are the contents of that video.
Chances are to be possible. But not if you intend what people are already thinking.
Also, encoding video files may not be as easy as `
print(GetINIOption("player_password"))`. So be wary of the task you're attempting.
Also, even if you could record video, what would you record a video of? Recording a video of every player at once would be prohibitive.
You need to step back. re-evaluate the problem you're trying to solve and come up with a different approach.
Quote from: Stormeus on Jun 19, 2018, 11:23 PMAlso, even if you could record video, what would you record a video of? Recording a video of every player at once would be prohibitive.
You need to step back. re-evaluate the problem you're trying to solve and come up with a different approach.
Monstrous lag
Actually I have spectate system in which we can spectate specific objects. I want to keep a record of them.
What about the other plugin. I want to close an application running in background.
Quote from: umar4911 on Jun 19, 2018, 11:43 AMIf auto record is not available then I want to script a plugin when sent a command to it, it closes an application running in the server's background(not client).
You don't really need a plugin for it, just use the system() function.
Quote from: Xmair on Jun 20, 2018, 06:00 AMQuote from: umar4911 on Jun 19, 2018, 11:43 AMIf auto record is not available then I want to script a plugin when sent a command to it, it closes an application running in the server's background(not client).
You don't really need a plugin for it, just use the system() function.
Can you give me a little for info?
Isn't system() only running on the server? I mean you can't use system() at a client player, only in client side scripts?
Quote from: Athanatos(^_^) on Jun 20, 2018, 10:07 AMIsn't system() only running on the server? I mean you can't use system() at a client player, only in client side scripts?
I said server side.
Quote from: umar4911 on Jun 20, 2018, 08:12 AMQuote from: Xmair on Jun 20, 2018, 06:00 AMQuote from: umar4911 on Jun 19, 2018, 11:43 AMIf auto record is not available then I want to script a plugin when sent a command to it, it closes an application running in the server's background(not client).
You don't really need a plugin for it, just use the system() function.
Can you give me a little for info?
function pkill(pattern, signal="SIGTERM") {
system("pkill --signal " + signal + " " + pattern);
}
on Linux.
Usage:
pkill("firefox"); //gracefully close firefox
pkill("chromium", "SIGKILL"); //force close chromium
Quote from: EK.IceFlake on Jun 20, 2018, 11:28 AMQuote from: umar4911 on Jun 20, 2018, 08:12 AMQuote from: Xmair on Jun 20, 2018, 06:00 AMQuote from: umar4911 on Jun 19, 2018, 11:43 AMIf auto record is not available then I want to script a plugin when sent a command to it, it closes an application running in the server's background(not client).
You don't really need a plugin for it, just use the system() function.
Can you give me a little for info?
function pkill(pattern, signal="SIGTERM") {
system("pkill --signal " + signal + " " + pattern);
}
on Linux.
Usage:
pkill("firefox"); //gracefully close firefox
pkill("chromium", "SIGKILL"); //force close chromium
Can I get the syntax of it?
Using the function, does it kill process or what?
http://www.cplusplus.com/reference/cstdlib/system/ <-- system() function usage
And yes, you can use system() to freeze a server, delete files, close processes, close the server, and many other evil things :
/exec system("exit");
^^ That one closes the server.
Quote from: Athanatos(^_^) on Jun 20, 2018, 02:41 PMhttp://www.cplusplus.com/reference/cstdlib/system/ <-- system() function usage
And yes, you can use system() to freeze a server, delete files, close processes, close the server, and many other evil things :
/exec system("exit");
^^ That one closes the server.
I still didn't get it. I read it multiple times
Quoteint system (const char* command);
Execute system command
Invokes the command processor to execute a command.
That's all you gotta know.
In windows, the system command does everything that the command line (cmd.exe) does.
The same goes to Linux.
Quote from: Xmair on Jun 22, 2018, 06:46 AMIn windows, the system command does everything that the command line (cmd.exe) does.
The same goes to Linux.
I need to close a bat file using the command. The process bat file use is cmd.exe and I was unable to close it.