Communication between AMXX and Python using sockets
Python script
Code:
import socket Code:
|
Re: Communication between AMXX and Python using sockets
I need this!!! thx!
I can finally use TF to control BOTS, hhhhhh 2020.12.30 I just test the code, but it give me error code "3" when establishing connection...how could this be? Err, it's a bit strange, when Py Listener start listening, netstat showed only 54500 of 0.0.0.0 is listening, while 127.0.0.1 doesnt. Using both 127.0.0.1 or 0.0.0.0 on AMX Client failed, however, when I use my LAN IP (192.168.56.185) on AMX Client, it works. For now I need to input my LAN IP manually, could it be more convenient? :oops: |
Re: Communication between AMXX and Python using sockets
I'm not sure if what you're doing is wrong either. Maybe that's how it works. Servers use the default 127.0.0.1 and desktop computers use their own ip which is assigned from the router since there could be serveral machines operating and localhost wouldn't be ideal in that case. You can port this to any computer languange that supports sockets, well mostly all of them.
One thing missing is that I rushed to post the script without making it so players can get specific results, such as showing their local wether a second or two later when they join the game. |
All times are GMT -4. The time now is 19:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.