Raised This Month: $ Target: $400
 0% 

Hello, Please Help Me!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XtremeXPC
New Member
Join Date: Nov 2010
Old 11-14-2010 , 12:50   Hello, Please Help Me!
Reply With Quote #1

Hello. I also like to know if there is a line that can be added in a plugin that uses IP. In case that IP is not selected by me, the server automatically powers off.
If anyone can help me as a sma made specifically for it, or line to be added in any plugin to achieve the same result ..

Thanks
XtremeXPC is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-14-2010 , 13:50   Re: Hello, Please Help Me!
Reply With Quote #2

There are already suggestions here about how to protect your plugin from being run on another server. You won't be able to just shutdown their server, all you need to do is prevent the plugin from running with set_fail_state().
__________________
fysiks is offline
XtremeXPC
New Member
Join Date: Nov 2010
Old 11-14-2010 , 13:58   Re: Hello, Please Help Me!
Reply With Quote #3

Please give me one example.. like .. set_fail_state().89.xx.xx.xx ? Or.. ?
Give me one example please
__________________
Visit www.xtremexpc.ro - The Next Level In Gaming !
XtremeXPC is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-14-2010 , 14:06   Re: Hello, Please Help Me!
Reply With Quote #4

Did you try searching yet?
__________________
fysiks is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 11-14-2010 , 14:14   Re: Hello, Please Help Me!
Reply With Quote #5

something like this

PHP Code:
#pragma semicolon 1

#include <amxmodx>
#include <amxmisc>

// Define the Plugin Version
new const VERSION[] = "1.0";

new 
ServerIP[] = "192.168.2.1:27015";

public 
plugin_init()
{
    
register_plugin("IP Protection Test"VERSION"Shuttle_Wave");

    if( !
task_exists(1234561) )
        
set_task(5.0"task_CheckIP"123456);
}

public 
task_CheckIP()
{
    new 
szIp[22];
    
get_user_ip(0szIpcharsmax(szIp));
    
    if(!
equal(ServerIPszIp))
        
set_fail_state"Private MOD." );

shuttle_wave is offline
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 11-14-2010 , 14:16   Re: Hello, Please Help Me!
Reply With Quote #6

You can:
1.Make a const for your local/real server ip.
2.Get server ip (local|real).
3.Compare them and if they are not the same use set_fail_state(message[])
or you can search.
SpeeDeeR is offline
XtremeXPC
New Member
Join Date: Nov 2010
Old 11-14-2010 , 14:30   Re: Hello, Please Help Me!
Reply With Quote #7

Last question , if you want to insert a plugin thing or another, Code is the same? or ..
__________________
Visit www.xtremexpc.ro - The Next Level In Gaming !
XtremeXPC is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-14-2010 , 15:16   Re: Hello, Please Help Me!
Reply With Quote #8

Quote:
Originally Posted by XtremeXPC View Post
Last question , if you want to insert a plugin thing or another, Code is the same? or ..
What? English please.
__________________
fysiks is offline
XtremeXPC
New Member
Join Date: Nov 2010
Old 11-14-2010 , 23:42   Re: Hello, Please Help Me!
Reply With Quote #9

Sorry, i don`t now english perfect. Repeat question. If i want to insert this code in another plugin ex: AMXX SS, or another plugin, who she like`s code ..?
__________________
Visit www.xtremexpc.ro - The Next Level In Gaming !
XtremeXPC is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-15-2010 , 19:13   Re: Hello, Please Help Me!
Reply With Quote #10

Just put this code in plugin_init():

PHP Code:
    new szIp[22]; 
    
get_user_ip(0szIpcharsmax(szIp)); 
     
    if(!
equal(ServerIPszIp)) 
        
set_fail_state"Private MOD." ); 
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 11:21.


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