Posts: 1,079
Threads: 64
Joined: Jan 2010
Like in, you have a gamemode/filterscript, and somebody steals it.. Is there any possibility to do like, if you run that gamemode/script on that IP, it is online. If not, it quits itself..
Posts: 270
Threads: 39
Joined: Jan 2009
Reputation:
0
public OnFilterScriptInit()
{
new current = GetServerVarAsString("bind");
new allowed = "127.0.0.1";
if(current != allowed) return 0;
}
Posts: 1,079
Threads: 64
Joined: Jan 2010
20.08.2010, 10:43
(
Последний раз редактировалось rbN.; 20.08.2010 в 16:50.
)
Quote:
Originally Posted by Mujib
public OnFilterScriptInit()
{
new current = GetServerVarAsString("bind");
new allowed = "127.0.0.1";
if(current != allowed) return 0;
}
|
So like, this quits the server?
/edit:
above one doesnt work..
Posts: 1,079
Threads: 64
Joined: Jan 2010
Hi, I have this code now:
pawn Код:
new
ip[16];
new allowed[16];
allowed = ("MAIIPWASHERE");
GetServerVarAsString("bind", ip, sizeof (ip));
if (!ip[0] || strcmp(ip, "MYIPWASHERE"))
{
for (;;)
{
printf("Don't steal my script!");
}
}
Problem is, when I use bind @ my server.cfg, I always get this:
Код:
[19:05:48] Unable to start server on ******:7777. Port in use?
Without the 'bind' it's all fine..
How to solve?