![]() |
Plugin interacting with AMX
I was thinking of coding a 'Sockets' plugin, which allow things like AMX to create sockets, and send data, for example, an IRC script. I was wondering if it is possible (and easy) to get this to interact with AMX or other plugins?
Any info provided will be useful :) thanks in advance |
Re: Plugin interacting with AMX
If it's about "advanced" programming like sockets and network IO, why not coding a metamod plugin directly in C/C++, instead of that AMX small stuff ?
|
Re: Plugin interacting with AMX
thats what i was going to do, however, i wanted AMX to have some sorta control over it, so that people can get it to do what they want, it would be for things like custom scripts. For example, when the plugin was loaded into metamod, it would give AMX smallscript some 'new' functions of some kind. so the script could use the sockets provided by the plugin. If you get what i'm saying :p
|
Re: Plugin interacting with AMX
I understand perfectly, however I'm not sure this is feasible. AMX's small script is compiled by AMX itself into bytecode, which is then interpreted. You can't add new opcodes and tell AMX that your external plugin is in charge of handling them, and AMX won't know how to compile your new instructions into bytecodes.
You can still decide to pass commands and instructions elseway. For example, your plugin could feature some simple "send" and "rcv" client commands, that would send and read bytes from a socket, and you could either call them from the server console by hand (great for testing) or through an AMX script by issuing a ClientCommand. It's ugly, but it can work. |
Re: Plugin interacting with AMX
ok, thanks for the help, you gave me pretty much what i wanted :p
I'll have to find a different way to do it ;) |
All times are GMT +2. The time now is 12:07. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.