|
Author
|
Message
|
|
Veteran Member
Join Date: Nov 2010
Location: Siberia, Irkutsk
|

01-02-2013
, 10:48
wan and lan download urls
|
#1
|
#include <amxmodx>
new wl_downloadurl, ip_adrr[16]
public plugin_init()
{
register_plugin("wanorlan", "0.1beta", "mockBa")
wl_downloadurl = get_cvar_pointer("sv_downloadurl")
}
public client_connect(id)
{
get_user_ip(id, ip_adrr, 15, 1)
if(!equali(ip_adrr, "10.", 3))
{
set_pcvar_string(wl_downloadurl, "http://10.91.140.125/cstrike/")
}
else
{
set_pcvar_string(wl_downloadurl, "http://mydomain/cstrike/")
}
}
I have sv_downloadurl "http://mydomain/cstrike/", but LAN users, without Internet, can't download files. Can you help me with script for switching urls for LAN and WAN users? LAN users from 10.0.0.0/8
The script works, I want to hear your advice about using it.
Last edited by ZASTRELIS; 01-02-2013 at 10:56.
|
|
|
|