19.01.2013, 19:53
I am using this to prevent someone to use the script on another IP that is not specified.
Now,what I want it to do is,when it is printing it failed to load the script,it will also delete the GameMode.amx file on /gamemodes folder in server directory,I have no idea how to do this. I think it is possible for it to be done as a .dll (writing del root function) but that is for windows servers and I don't know how can I start a plugin via the script.
I want this because it will prevent anyone to use the script if it is in the wrong IP and it will also make the script unusable again.
pawn Код:
public OnGameModeInit()
{
new
ip[16];
GetServerVarAsString("bind", ip, sizeof (ip));
if (!ip[0] || strcmp(ip, "192.168.0.127"))
{
for (;;)
{
printf("Failed to load the script!");
}
}
}
I want this because it will prevent anyone to use the script if it is in the wrong IP and it will also make the script unusable again.