01.03.2012, 22:28
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
Thanks
// 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;
}
|
you cam use compare the date!
Exemple: pawn Код:
Try this. |
|
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). |