Official Soldat Forums
Server Talk => Server Discussion => Topic started by: Michal Marcinkowski on August 12, 2007, 01:07:41 pm
-
In version 1.4.2 there is an ability to switch a player in the game to another server. When you use this function the client will disconnect and will have a message box appear to agree or not to go to another server. This idea has been discussed by me on my blog here (http://mm.soldat.pl/?p=18).
Script function:
procedure ForwardClient(SrcIP: String;SrcPort: Integer; TargetIP: String;TargetPort: Integer);
I think that explains everything. You can use it however you want to.
-
This fucking rocks! Thanks Michal :)
-
Now hexer can turn into the first soldat MMPFOMRFRMTG (<- yeah) called Soldatscape!
-
Cool Idea, Are there any servers now running something like this yet?
-
The only "down point", if you can call it like this, is that it needs special maps with "exits" to other servers. :-\
-
This sounds incredible and awsome. Now someone needs to use :)
-
yea pretty tight [: it will help out
-
The only "down point", if you can call it like this, is that it needs special maps with "exits" to other servers. :-\
Isn't there an event fired if a player goes out of bounds?
But this can be triggered by really anything. It's up to you when the player is transferred, he doesn't have to enter an "exit".
In Hexer mod you can be transferred to another server if you reach a certain level for example.
...shit I forgot to add a password to the forward function. Hmm ll think about it later.
-
Yes but then the player respawns in another map.
That means he has to pick his weapon again, build up speed etc, so he'll notice the change. You could try to take some of these effects away by building a socket connection between the two servers using the Scripting features for the Dedicated Server however.
I'm very curious to see the first server using this!
Grtz, DePhille
-
This could be cool for maps with buildings - have a separate sever running a map with the inside of that building.
Just an idea :D
-
well i might use it for servers with different level maxima and minima, like michal said
-
I am curious as to whether the new server knows that the client has been forwarded to it. Maybe that's why source IP and port are needed?
And if that's the case then how? Seems like there should of been a new procedure called onClientForward(SrcIP: String; SrcPort: Integer);
-
Can someone post a quick example, i'm real crappy at this stuff :(.
-
This can be used for soo many different ways! Thx MM :)
-
procedure ForwardClient(SrcIP: String;SrcPort: Integer; TargetIP: String;TargetPort: Integer);
Wtf?
-
procedure ForwardClient(SrcIP: String;SrcPort: Integer; TargetIP: String;TargetPort: Integer);
Wtf?
It's the port on which they connected - you can see it in arsse when they join the game.
Although I see no way of getting it through scripting...
-
procedure ForwardClient(SrcIP: String;SrcPort: Integer; TargetIP: String;TargetPort: Integer);
Wtf?
It's the port on which they connected - you can see it in arsse when they join the game.
Although I see no way of getting it through scripting...
That would make sense... but you can't tell the source port anyway. It really should be
procedure ForwardClient(ID: Byte; TargetIP: String; TargetPort: Integer; Password: String);
-
Ohhh password! Definitely needed!
Also, in Soldat.ini...
[NETWORK]
JoinPort=23073
so THIS is the port the player joins on? is this client-side?
-
Is it possible to have the confirm box appear BEFORE it removes them from the current server?
-
I don't know why EnEsCe put the port in and how to get it. I guess he'll tell you when he gets back from vacation.
-
Also, in Soldat.ini...
[NETWORK]
JoinPort=23073
so THIS is the port the player joins on? is this client-side?
I think that's the port of the last server you've joined.
I'm kinda sure the port we need is the one showed in the console along with the IP when somebody tries to join a game.
-
(Still on vacation)
MM you weren't meant to announce it yet... I haven't even documented it in the manual... I didnt want the function announced yet because I was still modifying it.... Ill sort it when I get home.
Date Posted: 16 August 2007, 01:42:04 pm
And SrcPort has to be there for if you use the function in OnRequestGame, since the port the player sends data to you on is usually random unless they have 23073 opened on their router, and its not saved anywhere in the server during the request game procedure.... So dont bother using this yet untill I have actually added it to the manual, because its going to be changed.
-
Can I request that the confirmation box appear while they are still connected to the current server instead of making then leave the server and then asking?
-
+ password plox ;D
-
Is it possible to have the confirm box appear BEFORE it removes them from the current server?
I think either MM or EnEsCe mentioned it asking first.
-
cool idea and will help out a bid
-
This could be cool for maps with buildings - have a separate sever running a map with the inside of that building.
Just an idea :D
yeah, can be done with scripting (in a way):
*blah blah blah*
procedure OnPlayerSpeak(ID:byte;Text:string);
var
 X, Y, DoorX, DoorY: single;
begin
 X:=round(GetPlayerStat(ID,'X'));
 Y:=round(GetPlayerStat(ID,'Y'));
 DoorX:=round(123.456);
 DoorY:=round(654.321);
 if (X > DoorX-50) and (X < DoorX+50)
 and (Y > DoorY-100) and (Y < DoorY+100)
 and (Text = '!enter') then begin
  ForwardClient('123.456.78.90',23074,'123.456.78.90',23075);
 end;
end;
*blah blah blah*
maybe there should be a:
function GetServerStat(IP: string; Port: integer; Stat: string);
so you can check:
Stats:
Name - string ----- Server name
Map - string ----- Current map playing
connection - integer ----- 0 for LAN, 1 for internet
Players - integer ----- Current players
Maxp - integer ----- max players
Gpass - string ----- Game password, not admin pass
APass - string ----- Returns asterics (*) for each letter in pass, doesn't return actual pass (maybe return pass if safe mode off?)
Passworded - boolean ----- password needed?
ClanMatch - boolean ----- clan match enabled?
Greet1, Greet2, Greet3 - string ----- Greeting messages
Balance - boolean ----- balance teams?
maxvote - single ----- vote percent
minping - integer ----- minimum ping limit
maxping - integer ----- maximum ping limit
Dedicated - boolean ----- Dedicated server?
Lobby - string ----- lobby registered in (ip or http string)
Respawn - single ----- respawn time
bonuses - string ----- bonuses allowed (string in 5 parts (F P B V C) inactive(0) or active(1))
freq - integer ----- bonus frequency (1 to 5)
bots - integer ----- number of bots
FFire - boolean ----- friendly fire?
loop - boolean ----- loop maps?
style - integer ----- game mode (same as const's in default script "core")
weapons - string ----- active weaps (same format as bonuses but 14 parts (DD HK AK SA SZ RG 79 BT MM MG US CK CS 72) 0 or 1)
nades - integer ----- max nades
limit - integer ----- score limit
statgun - boolean ----- stat guns?
RSA - string ----- (same as weaps and bonuses, 3 parts (R S A) 0 or 1)
Aamt - integer ----- Advance mode amount
and anything else you can find server-side in soldat.ini and server.ini
-
OMFG! This is cool! Once I get the money I can buy the servers and get someone (Rampage) to make a super uber cool script and I'll have a RPG server!