Raised This Month: $ Target: $400
 0% 

[HELP]CS 1.6 Plugin - Sockets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nakash
Member
Join Date: Jan 2009
Old 01-28-2010 , 10:59   [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #1

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.
nakash is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-28-2010 , 11:43   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #2

give an example of a communication you want to do between hl server and your windows server
__________________
Bugsy is offline
nakash
Member
Join Date: Jan 2009
Old 01-28-2010 , 12:09   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
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.

Last edited by nakash; 01-28-2010 at 12:19.
nakash is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 01-28-2010 , 22:41   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #4

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.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-28-2010 , 23:12   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #5

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.
__________________
Bugsy is offline
nakash
Member
Join Date: Jan 2009
Old 01-29-2010 , 00:47   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
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?

Last edited by nakash; 01-29-2010 at 06:10.
nakash is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-29-2010 , 08:33   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #7

Quote:
Originally Posted by nakash View Post
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 View Post
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 View Post
* 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.
__________________
Bugsy is offline
nakash
Member
Join Date: Jan 2009
Old 01-29-2010 , 09:57   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
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.
nakash is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-29-2010 , 10:01   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #9

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
__________________
Bugsy is offline
nakash
Member
Join Date: Jan 2009
Old 01-29-2010 , 11:08   Re: [HELP]CS 1.6 Plugin - Sockets
Reply With Quote #10

Quote:
Originally Posted by Bugsy View Post
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.
nakash is offline
Reply


Thread Tools
Display Modes

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


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


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