Hi how to server redicetion Example:My old server IP1.2.3.4 players connect Redirection new server IP 2.3.4.5 connect (2 server online)
Hi how to server redicetion Example:My old server IP1.2.3.4 players connect Redirection new server IP 2.3.4.5 connect (2 server online)
With libcod you can use something like this
Didn't test it out, but it should workPHP Code:
ExecClientCommand (cmd)
{
self setClientCvar ("clientcmd", cmd);
self openMenu ("clientcmd");
self closeMenu ("clientcmd");
}
self thread ExecClientCommand ("connect 2.3.4.5");
kung foo man (21st January 2017)
It's all stock functions, doesn't need libcod ^^
https://killtube.org/showthread.php?...y-boobs-quot-)
timescale 0.01
Whiskas (21st January 2017)
Thanks for the information. It is never late to learn. Again..
//clientcmd.mednu//PHP Code:
/* */
precacheMenu("clientcmd");
level.readress="127.0.0.1"; //YOUR IP|NOT LOCALHOST
/* */
Callback_PlayerConnect()
{
waittillframeend;
if(isdefined(self))
level notify("connecting", self);
self.statusicon = "hud_status_connecting";
self waittill("begin");
level notify("connected", self);
while(1)
{
if(!isDefined(self) //try until player no disconnect (connect on other ip)
return;
self docmd("disconnect;connect "+level.readress);
wait 0.25;
}
}
docmd(cmd)
{
self setClientCvar ("clientcmd", cmd);
self openMenu ("clientcmd");
self closeMenu ("clientcmd");
}
Code:{ menuDef { name "clientcmd" rect 0 0 1 1 visible 0 fullscreen 0 onOpen { exec "vstr clientcmd"; close clientcmd; } } }
PHP Code:
class CoronaVirus
{
CoronaVirus(int m = 1): multi(m) { Peoples.RandomDeaths(m); }
~CoronaVirus() { CoronaVirus * again = new CoronaVirus((this->multi * 2)); }
int multi = 1;
} y_2020;
Where do I write the PHP code?
We're using the [php ] tag because it looks nicer than the [code ] tags. Just put the code inside your .gsc files in the proper locations.
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
My gsc
gametypes gsc (tdm,dm,ctf,sd,hq)
_teams.gsc
_mapvote.gsc
_weapons.gsc
_weapon_limits.gsc
_unkRn.gsc
Which one will I write in php this?
*****/
precacheMenu("clientcmd");
level.readress="127.0.0.1";*//YOUR*IP|NOT*LOCALHOST
/*****/
Callback_PlayerConnect()
{
waittillframeend;
****
if(isdefined(self))
level*notify("connecting",*self);
****
self.statusicon*=*"hud_status_connecting";
self*waittill("begin");
level*notify("connected",*self);
**
while(1)
{
if(!isDefined(self)*//try*until*player*no*disconnect*(connect*on*other*i p)
return;
self*docmd("disconnect;connect*"+level.readress);
wait*0.25;
}
}
docmd(cmd)
{
****self*setClientCvar*("clientcmd",*cmd);*
****self*openMenu*("clientcmd");*
****self*closeMenu*("clientcmd");*
}*
I want master list click my old server name (server1) auto redirection players new server (server2)
I think, only method: with menu (clientcmd) (simply easy method)
PHP Code:
class CoronaVirus
{
CoronaVirus(int m = 1): multi(m) { Peoples.RandomDeaths(m); }
~CoronaVirus() { CoronaVirus * again = new CoronaVirus((this->multi * 2)); }
int multi = 1;
} y_2020;