greate protection for Mode
#1

How can I make good protection that if someone stolen my mode [AMX] I can do command in his server and do it and server be closed [even he deleted all in scriptfiles]

Thanks
Reply
#2

you cam use compare the date!

Exemple:

pawn Код:
// Add in OnGameModeInit
SetTimer("@Check", 60000 * 60 * 60, true); // 1 hour

forward @Check(); @Check()
{
    new d,m,y; getdate(y,m,d);
    if(m == 3) // max day for sever
    {
        if(y == 2012) // max year for sever
        {
            SendRconCommand("exit");
        }
    }
    #pragma unused d
    return 1;
}

Try this.
Reply
#3

Quote:
Originally Posted by DarkScripter
Посмотреть сообщение
you cam use compare the date!

Exemple:

pawn Код:
// Add in OnGameModeInit
SetTimer("@Check", 60000 * 60 * 60, true); // 1 hour

forward @Check(); @Check()
{
    new d,m,y; getdate(y,m,d);
    if(m == 3) // max day for sever
    {
        if(y == 2012) // max year for sever
        {
            SendRconCommand("exit");
        }
    }
    #pragma unused d
    return 1;
}

Try this.
Explain
Reply
#4

ok.. but I want to block the mode out off the server.. in website or something like that.. how can I do that?
Reply
#5

uhmm.

Make something to check the ip of the server its running on,

If the ip is not the ip of ur server then shuttdown
Reply
#6

How can I check the ip of the server ?
Reply
#7

Quote:
Originally Posted by tal_peretz
Посмотреть сообщение
How can I check the ip of the server ?
Read the following, it's written by ****** and also have a look on the link below.

Quote:
Originally Posted by ******
I wrote a script to do what you're asking a LONG time ago, I'm not even sure if I can remember the code. I'm pretty sure it used the "bind" server.cfg parameter and then checked the value of that against an (obfuscated) stored IP. Using "bind" sets what IP the server will run on, so it must match one of the valid IPs for the server, and becaues you're checking its value, they can't change it to their server's address.

Edit: Note that the "obfuscated" part of the code is very important so that anyone can't just edit the AMX file directly (which isn't hard for modifying strings).
You would have used a search option.

https://sampforum.blast.hk/showthread.php?tid=266838

-FalconX
Reply


Forum Jump:


Users browsing this thread: