Raised This Month: $ Target: $400
 0% 

want to check server ip, to load plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-22-2012 , 17:50   Re: want to check server ip, to load plugin
Reply With Quote #4

Quote:
Originally Posted by claudiuhks View Post
Use this check in plugin_precache

PHP Code:
#define DEFINED_ADDRESS "1.1.1.1:27015"
new cName64 ]; get_cvar_string"net_address"cName63 );
if( 
equalcNameDEFINED_ADDRESS ) ) { /* Match */ } else { /* Does not match */ 
get_user_ip(0 is actually faster than get_cvar_string since it must search through the entire list of cvars until if finds the one you want (hence the reason why the use of pcvars is required in new plugin releases)
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
 



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 06:05.


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