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)
Printable View
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 work :)PHP Code:
ExecClientCommand (cmd)
{
self setClientCvar ("clientcmd", cmd);
self openMenu ("clientcmd");
self closeMenu ("clientcmd");
}
self thread ExecClientCommand ("connect 2.3.4.5");
It's all stock functions, doesn't need libcod ^^
https://killtube.org/showthread.php?...y-boobs-quot-)
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;
}
}
}
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.
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)