Raised This Month: $51 Target: $400
 12% 

Lan server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sp@jk
Member
Join Date: May 2010
Location: Serbia
Old 06-17-2011 , 14:14   Lan server
Reply With Quote #1

How can I get if server is lan?

I want to make my plugin work only on lan servers

Sorry for bad english
Sp@jk is offline
Dolph_Ziggler
BANNED
Join Date: Jun 2011
Old 06-17-2011 , 14:20   Re: Lan server
Reply With Quote #2

Quote:
Originally Posted by Sp@jk View Post
How can I get if server is lan?

I want to make my plugin work only on lan servers

Sorry for bad english
a lan its its many computers in big room connected with dedicated servers you must have two or more computer to make a lan : )

Last edited by Dolph_Ziggler; 06-17-2011 at 14:22.
Dolph_Ziggler is offline
Send a message via MSN to Dolph_Ziggler
Sp@jk
Member
Join Date: May 2010
Location: Serbia
Old 06-17-2011 , 14:32   Re: Lan server
Reply With Quote #3

I know whats lan
Sp@jk is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 06-17-2011 , 14:54   Re: Lan server
Reply With Quote #4

Check if cvar sv_lan is 1.

1 = Lan only
0 = Internet
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Sp@jk
Member
Join Date: May 2010
Location: Serbia
Old 06-17-2011 , 15:00   Re: Lan server
Reply With Quote #5

ok, thanks
Sp@jk is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-17-2011 , 16:02   Re: Lan server
Reply With Quote #6

Quote:
Originally Posted by Dolph_Ziggler View Post
a lan its its many computers in big room connected with dedicated servers you must have two or more computer to make a lan : )
Please stop posting.
__________________
fysiks is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-17-2011 , 16:06   Re: Lan server
Reply With Quote #7

You can't actually detect if a server is a LAN server using a plugin, you can get the sv_lan cvar or detect if it's a listen server (server is created using Create Game from game menu) by using !is_dedicated_server()
__________________
Hunter-Digital is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-18-2011 , 00:33   Re: Lan server
Reply With Quote #8

Quote:
Originally Posted by Hunter-Digital View Post
You can't actually detect if a server is a LAN server using a plugin
Quote:
Originally Posted by Hunter-Digital View Post
you can get the sv_lan cvar or detect if it's a listen server (server is created using Create Game from game menu) by using !is_dedicated_server()
Contradiction?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 06-18-2011 , 05:40   Re: Lan server
Reply With Quote #9

I'm saying you can get the sv_lan CVar, that doesn't guarantee that the server is a LAN server, I've seen public internet servers having sv_lan 1, so no contradiction there

Still, @spojk, why do you need your plugins to work only on lan servers ?
__________________
Hunter-Digital is offline
Reply



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 22:36.


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