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

check lan or public ip


Post New Thread Reply   
 
Thread Tools Display Modes
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-25-2018 , 06:41   Re: check lan or public ip
Reply With Quote #11

Check the value of sv_lan.
__________________
klippy is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 02-26-2018 , 13:15   Re: check lan or public ip
Reply With Quote #12

Quote:
Originally Posted by KliPPy View Post
Check the value of sv_lan.
what you mean?? what is sv_lan ??
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-26-2018 , 13:23   Re: check lan or public ip
Reply With Quote #13

A server cvar. If sv_lan is set to 1 then the server isn't accessible from the internet.
__________________
klippy is offline
arvEL.
Senior Member
Join Date: Dec 2014
Location: Iraq
Old 02-28-2018 , 06:53   Re: check lan or public ip
Reply With Quote #14

Quote:
Originally Posted by KliPPy View Post
A server cvar. If sv_lan is set to 1 then the server isn't accessible from the internet.
how can i check this cvar??
__________________
arvEL. is offline
Send a message via Skype™ to arvEL.
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-28-2018 , 07:53   Re: check lan or public ip
Reply With Quote #15

For a one time check use:
PHP Code:
iVal get_cvar_num"sv_lan" ); 

If you will be checking multiple times, get the pointer then use get_pcvar_num().

PHP Code:
new g_pSV_Lan;

//In plugin init or cfg
g_pSV_Lan get_cvar_pointer"sv_lan" );

//When you need the value
iVal get_pcvar_numg_pSV_Lan ); 
__________________

Last edited by Bugsy; 02-28-2018 at 07:55.
Bugsy 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 07:04.


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