AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Lan server (https://forums.alliedmods.net/showthread.php?t=159475)

Sp@jk 06-17-2011 14:14

Lan server
 
How can I get if server is lan?

I want to make my plugin work only on lan servers

Sorry for bad english :)

Dolph_Ziggler 06-17-2011 14:20

Re: Lan server
 
Quote:

Originally Posted by Sp@jk (Post 1490208)
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 : )

Sp@jk 06-17-2011 14:32

Re: Lan server
 
I know whats lan :)

drekes 06-17-2011 14:54

Re: Lan server
 
Check if cvar sv_lan is 1.

1 = Lan only
0 = Internet

Sp@jk 06-17-2011 15:00

Re: Lan server
 
ok, thanks :)

fysiks 06-17-2011 16:02

Re: Lan server
 
Quote:

Originally Posted by Dolph_Ziggler (Post 1490209)
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.

Hunter-Digital 06-17-2011 16:06

Re: Lan server
 
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()

Exolent[jNr] 06-18-2011 00:33

Re: Lan server
 
Quote:

Originally Posted by Hunter-Digital (Post 1490299)
You can't actually detect if a server is a LAN server using a plugin

Quote:

Originally Posted by Hunter-Digital (Post 1490299)
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?

Hunter-Digital 06-18-2011 05:40

Re: Lan server
 
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 :P

Still, @spojk, why do you need your plugins to work only on lan servers ?


All times are GMT -4. The time now is 23:24.

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