26.10.2016, 14:34
(
Last edited by TheLustcheR; 27/10/2016 at 01:32 PM.
)
Hello Everybody
Hello, I will share with you four ways, very simple, your modem protection.
The first way, check server IP:
Pastebin: Here.
So what we have here, anyway?
We ran a test if the server IP compatible to write server IP in "server.cfg" file.
If is not compatible, the server is shut down.
Second way, check server slots:
Pastebin: Here.
So what we have here, anyway?
Initially lowered the maximum setting of the slots on the server (default 500) and set the desired amount to us.
Then we ran a test if the server slots compatible to write server slots in "server.cfg" file.
If is not compatible, the server is shut down.
Third way, check server port:
Pastebin: Here.
So what we have here, anyway?
We ran a test if the server port compatible to write server port in "server.cfg" file.
If is not compatible, the server is shut down.
Fourth way, check GM name:
Pastebin: Here.
So what we have here, anyway?
We ran a test if the server GM name compatible to write server GM name in "server.cfg" file.
If is not compatible, the server is shut down.
.My Pastebin: Here
Hello, I will share with you four ways, very simple, your modem protection.
The first way, check server IP:
pawn Code:
#include <a_samp>
#define IP "0.0.0.0"
public OnGameModeInit()
{
new ServerIP[16];
GetServerVarAsString("bind", ServerIP, sizeof(ServerIP));
if(strcmp(ServerIP, IP, false)) SendRconCommand("exit");
return 1;
}
So what we have here, anyway?
We ran a test if the server IP compatible to write server IP in "server.cfg" file.
If is not compatible, the server is shut down.
Second way, check server slots:
pawn Code:
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 32
public OnGameModeInit()
{
if(GetMaxPlayers() != MAX_PLAYERS) SendRconCommand("exit");
return 1;
}
So what we have here, anyway?
Initially lowered the maximum setting of the slots on the server (default 500) and set the desired amount to us.
Then we ran a test if the server slots compatible to write server slots in "server.cfg" file.
If is not compatible, the server is shut down.
Third way, check server port:
pawn Code:
#include <a_samp>
#define Port 7777
public OnGameModeInit()
{
if(GetConsoleVarAsInt("port") != Port) SendRconCommand("exit");
return 1;
}
So what we have here, anyway?
We ran a test if the server port compatible to write server port in "server.cfg" file.
If is not compatible, the server is shut down.
Fourth way, check GM name:
pawn Code:
#include <a_samp>
#define GameModeAMX "NameAMX"
public OnGameModeInit()
{
new SGameModeAMX[32];
GetConsoleVarAsString("gamemode0", SGameModeAMX, sizeof(SGameModeAMX));
if(strcmp(SGameModeAMX, GameModeAMX, false)) SendRconCommand("exit");
return 1;
}
So what we have here, anyway?
We ran a test if the server GM name compatible to write server GM name in "server.cfg" file.
If is not compatible, the server is shut down.
.My Pastebin: Here
** Sorry for my English, see you soon...