SA-MP Forums Archive
greate protection for Mode - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: greate protection for Mode (/showthread.php?tid=322370)



greate protection for Mode - tal_peretz - 01.03.2012

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


Re: greate protection for Mode - DarkScripter - 02.03.2012

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.


Re: greate protection for Mode - milanosie - 02.03.2012

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


Re: greate protection for Mode - tal_peretz - 02.03.2012

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


Re: greate protection for Mode - milanosie - 02.03.2012

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


Re: greate protection for Mode - tal_peretz - 02.03.2012

How can I check the ip of the server ?


Re: greate protection for Mode - FalconX - 02.03.2012

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