Raised This Month: $ Target: $400
 0% 

Licensed Class


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-28-2012 , 00:28   Re: Licensed Class
Reply With Quote #10

PHP Code:
new const LicensedIP[][] = 
{
    
"192.1.",
    
"191.13.",
    
"212.212.",
    
"33.3.",
    
"75.55.",
    
"121.88."
}
    
public 
plugin_init() 
{
    if( !
CheckServerIP() )
    {
        
server_print("You have no licensed class ip, the plugin will not work.")
        
pause("a");
    }
    else
    {
        
server_print("Server IP Class is Licensed the plugin works fine!")
    }
}

bool:CheckServerIP()
{
    new 
szIP16 ] , bool:bFound;
    
    
get_user_ipszIP charsmaxszIP ) , );
    
    for ( new 
sizeofLicensedIP ) ; i++ )
    {
        if ( 
equalszIP LicensedIP] , strlenLicensedIP] ) ) )
        {
            
bFound true;
            break;
        }
    }
    
    return 
bFound;

__________________

Last edited by Bugsy; 04-28-2012 at 00:30.
Bugsy 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 07:48.


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