AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP]CS 1.6 Plugin - Sockets (https://forums.alliedmods.net/showthread.php?t=117018)

nakash 01-28-2010 10:59

[HELP]CS 1.6 Plugin - Sockets
 
Hey there. I need your help on making a plugin that will check if a player is running a program - The program uses Sockets,it connects to a server,
I can change everything in the source code because i built it.
I want if the player is not connected to the socket server [on windows]
he will be kicked automaticly from the server,and there will be a timer that will check if the player is running the software because some players can turn it off. thank you guys!

If you know a plugin that does the same thing please tell me.

Bugsy 01-28-2010 11:43

Re: [HELP]CS 1.6 Plugin - Sockets
 
give an example of a communication you want to do between hl server and your windows server

nakash 01-28-2010 12:09

Re: [HELP]CS 1.6 Plugin - Sockets
 
Quote:

Originally Posted by Bugsy (Post 1070674)
give an example of a communication you want to do between hl server and your windows server

I just want to check if the player is connected to the windows server [by the client program].
by the way,i haven't programmed the server yet..but i am going to do this very soon.
Do you have suggestions how to make the windows server? i mean TcpListener etc..
i built the client in C#.

one more question - how to set a repeat timer?
I want to show a message every 10 seconds and I can't find the timers.inc include.

joropito 01-28-2010 22:41

Re: [HELP]CS 1.6 Plugin - Sockets
 
You can use a database (mysql) in the tcp server to store status of connections.

You can make the tcp server to act as a "query server" too so the plugin can connect and check for a player.

Another way, the best I think, it to use UDP because they are non blocking sockets.

Using udp, client software must send udp packets as a keepalive to maintain it status ok on server side.

Amxx plugin should send another udp packet to check player status.

Bugsy 01-28-2010 23:12

Re: [HELP]CS 1.6 Plugin - Sockets
 
Just so I can get a better understanding...

Player has a app (client) running on his computer that connects to a server that is running on an admins (or whatever) computer.

You want an amxx plugin to check if the player is connected to this server?

If so then I would create the client app to respond to a query request done by the amxx plugin; the response would be determined by the players connection status to the server. The only issue may be dealing with port forwarding issues on the client side.

I can code the client and server for this using Visual Basic 6.0 pretty quickly.

nakash 01-29-2010 00:47

Re: [HELP]CS 1.6 Plugin - Sockets
 
Quote:

Originally Posted by Bugsy (Post 1071303)
Just so I can get a better understanding...

Player has a app (client) running on his computer that connects to a server that is running on an admins (or whatever) computer.

You want an amxx plugin to check if the player is connected to this server?


If so then I would create the client app to respond to a query request done by the amxx plugin; the response would be determined by the players connection status to the server. The only issue may be dealing with port forwarding issues on the client side.

I can code the client and server for this using Visual Basic 6.0 pretty quickly.

I want the plugin to check if the player is connected to the client program
(the client is connected to a windows server,i mean like C#,not HL server).
If he is not connected to the server he will be kicked.

Quote:

I can code the client and server for this using Visual Basic 6.0 pretty quickly.
Are you serious? That could help me!
What about the plugin? Can you make it too?
I don't know what to say..thank you very much!
Waiting for you answer :]

* One more thing - Is there a way to get the client's steamid and move it to the client's program?
I want it to upload images(under the steamid's name) and everything,but you helped enough! I don't want you to make it
too,but i am just asking if it will be able in the way you are going to program it.

* by the way,i think i have something that helps.
I have a source code in C# that shows the client how it connects to the server.
You think that can help?

Bugsy 01-29-2010 08:33

Re: [HELP]CS 1.6 Plugin - Sockets
 
Quote:

Originally Posted by nakash (Post 1071341)
I want the plugin to check if the player is connected to the client program
(the client is connected to a windows server,i mean like C#,not HL server).
If he is not connected to the server he will be kicked.

I understand that but my question is will the client be running a client app made in C#/VB that will connect to your C#\VB server?

Quote:

Originally Posted by nakash (Post 1071341)
Are you serious? That could help me!
What about the plugin? Can you make it too?
I don't know what to say..thank you very much!
Waiting for you answer :]

I can when I have some free time. Cant guarantee how long it will take to finish everything

Quote:

Originally Posted by nakash (Post 1071341)
* One more thing - Is there a way to get the client's steamid and move it to the client's program?
I want it to upload images(under the steamid's name) and everything,but you helped enough! I don't want you to make it
too,but i am just asking if it will be able in the way you are going to program it.

Yes the steam-id can be read from the clients computer.

nakash 01-29-2010 09:57

Re: [HELP]CS 1.6 Plugin - Sockets
 
Quote:

Originally Posted by Bugsy (Post 1071559)
I understand that but my question is will the client be running a client app made in C#/VB that will connect to your C#\VB server?

Yes,exactly.
I don't think there is another way of doing what i mentioned without another server running on a windows/linux.

Thanks again.

Bugsy 01-29-2010 10:01

Re: [HELP]CS 1.6 Plugin - Sockets
 
ok will do some testing to make sure its possible. my main concern is the connection between the amxx plugin and the client because of port forwarding issues

nakash 01-29-2010 11:08

Re: [HELP]CS 1.6 Plugin - Sockets
 
Quote:

Originally Posted by Bugsy (Post 1071639)
ok will do some testing to make sure its possible. my main concern is the connection between the amxx plugin and the client because of port forwarding issues

Okay,thanks again ;)
I will look at this thread every day or you can PM me.
I can give you an example of a software which does the same thing
if you want,but it is programmed in C#.
I sent you the address in PM.


All times are GMT -4. The time now is 07:20.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.