.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Enhancement Workshop > Metamod and metamod plugins
Metamod and metamod plugins Plugins and improvements for the metamod server-side mod

Reply
 
Thread Tools
Plugin interacting with AMX
Old
  (#1)
FrostyCoolSlug
Member
 
FrostyCoolSlug's Avatar
 
Status: Offline
Posts: 318
Join Date: Mar 2004
Default Plugin interacting with AMX - 10-04-2004

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


=====
Craig "FrostyCoolSlug" McLure
Network Administrator of the ChatSpike IRC Network
  
Reply With Quote
Re: Plugin interacting with AMX
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Plugin interacting with AMX - 11-04-2004

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 ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Plugin interacting with AMX
Old
  (#3)
FrostyCoolSlug
Member
 
FrostyCoolSlug's Avatar
 
Status: Offline
Posts: 318
Join Date: Mar 2004
Default Re: Plugin interacting with AMX - 12-04-2004

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


=====
Craig "FrostyCoolSlug" McLure
Network Administrator of the ChatSpike IRC Network
  
Reply With Quote
Re: Plugin interacting with AMX
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Plugin interacting with AMX - 12-04-2004

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Plugin interacting with AMX
Old
  (#5)
FrostyCoolSlug
Member
 
FrostyCoolSlug's Avatar
 
Status: Offline
Posts: 318
Join Date: Mar 2004
Default Re: Plugin interacting with AMX - 12-04-2004

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


=====
Craig "FrostyCoolSlug" McLure
Network Administrator of the ChatSpike IRC Network
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com