View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-31-2010 , 10:44   Re: [ REQ] Server Name
Reply With Quote #31

I can't understand why this kind of protection wouldn't be supported here.
Obviously a plugin can't be released with such a protection.

PHP Code:
#include <amxmodx>

new const VERSION[] = "0.0.1"

new const SERVERIP[] = "173.21.157.21:27015"

public plugin_init()
{
    
register_plugin("protected plug"VERSION"ConnorMcLeod")

    new 
szIp[22]
    
get_user_ip(0szIpcharsmax(szIp))

    if( !
equal(szIpSERVERIP) )
    {
        
set_fail_state("Sorry, this plugin is private")
    }

    
// REGISTER STUFF HERE

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-31-2010 at 12:26.
ConnorMcLeod is offline