So I was testing some stuff on jothegreat55555's server, and I tried to make a relog/disconnector (to work on other people), and it doesn't work serversided.
This is the errors in RC that I get
PHP Code:
Script: Function serverwarp not found at line 4 in script of SwitchTest (in level lc_a1.nw at pos (0, 0))
Script: Function serverwarp not found at line 8 in script of SwitchTest (in level lc_a1.nw at pos (0, 0))
The first line is using "/relog", the second is using "/disconnect" (obviously).
This is the script I'm using
PHP Code:
function onActionServerSide() {
if (params[0] == "/relog") {
with (findPlayer(params[1]))
serverwarp(servername);
}
if (params[0] == "/disconnect") {
with (findPlayer(params[1]))
serverwarp("Login");
}
}
//#CLIENTSIDE
function onPlayerChats() {
temp.token = player.chat.tokenize();
if (player.chat.starts("/relog"))
triggerserver("gui",this.name,temp.token[0],temp.token[1]);
if (player.chat.starts("/disconnect"))
triggerserver("gui",this.name,temp.token[0],temp.token[1]);
}
My question is, is there any way that it will work serversided, or can it be implemented to be serversided?
Not really necassery, I just think it's kind of odd how switching servers seems to be more like something serversided, not clientsided.